Arduino vs DS1305/1306

I was trying the code found here:
http://www.nearfuturelaboratory.com/2006/12/14/arduino-and-ds1306-real-time-clock/?rcommentid=4942&rerror=incorrect-captcha-sol&rchash=8617ed792ae6cf528e68eda46b3299c4#commentform

When I try to compile, it highlighted this line:

write_rtc_register(0×8F,0×01|0×02|0×04);

and said this below the window:
error: stray '' in program In function 'void setup()':
In function 'void __vector_2()':
In function 'void loop()':

Can anyone explain what I/they did wrong? I am using Arduino v10 Windows software and Arduino Diciemela

I figured it out finally…

Seems that when I copied the code from the page, the symbol they used for HEX (IE 0x01) the x symbol was not same as x character.

After I substituted all of those symbols with a true x character, I got past this issue.

Then, I had same problem with the quote character "...

After I fixed that, I get errors with the Interrupt routines claiming GICR is not declared in the scope...
I found a topic on that, but it did not give me working results, so I commented out the interrupts and it completely compiles..

more to come later if I can figure out the Interrupt routines..

I finally got my current version of their source working.

For the DS1305 I used:
Pins 9, 14 and 16 were tied to VCC
Pin 6 used 10k pullup to VCC
Pins 3 and 4 connect to the crystal
Pin 2 connects to +battery or short to ground if not used
Pins 1, 8 tie to Gnd
Pin 10 goes to D7 on Arduino
Pin 11 goes to D13
Pin 12 goes to D11
Pin 13 goes to D12
Pins 5, 7, 15 were No Connect.

My current semi-functional source (Modified from the first post web link source)
no way to configure time yet, but it starts at 12:00am and counts up (hour 0, min 0, sec 0) and outputs current time to PC serial port @ 9600 baud

#define DATAOUT 11 //MOSI
#define DATAIN 12 //MISO
#define SPICLOCK 13 //sck
#define RTC_CHIPSELECT 7 // chip select (ss/ce) for RTC, active high
#define LED 10

byte clr;
//Function SPI_Transfer
char spi_transfer(volatile char data)
{
/*
Writing to the SPDR register begins an SPI transaction
*/
SPDR = data;
/*
Loop here until the transaction complete. 
SPIF bit = SPI Interrupt Flag. When interrupts are enabled, & 
SPIE bit = 1 enabling SPI interrupts, this bit sets =1 when
transaction finished.
*/
while (!(SPSR & (1<<SPIF)))
{

};
// received data appears in the SPDR register

return SPDR;
}
void setup()
{

char in_byte;
clr = 0;
in_byte = clr;

Serial.begin(9600);
// set direction of pins

pinMode(LED, OUTPUT);
pinMode(DATAOUT, OUTPUT);

pinMode(DATAIN, INPUT);
pinMode(SPICLOCK,OUTPUT);

pinMode(RTC_CHIPSELECT,OUTPUT);
digitalWrite(RTC_CHIPSELECT,LOW); //disable RTC

// set up the RTC by enabling the oscillator, disabling the write protect in the control register,
// enabling AIE0 and AIE1 and the 1HZ Output

// 0×8F to 00000111 = 0×07
// EOSC Active Low

// WP Active High, so turn it off
in_byte = read_rtc_register(0x0F);

Serial.print("CTRL REG [");
Serial.print(in_byte, HEX);
write_rtc_register(0x8F,0x01|0x02|0x04);
// little sanity checks
in_byte = read_rtc_register(0x0F);

Serial.print("CTRL REG [");
Serial.print(in_byte, HEX);

Serial.println("]");
delay(10);

in_byte = read_rtc_register(0x10);
Serial.print("STATUS REG [");

Serial.print(in_byte, BIN);
Serial.println("]");

// set up both alarms at 00 seconds?
write_rtc_register(0x87,0x00);

// mask all the other registers
write_rtc_register(0x88,0x80);

write_rtc_register(0x89,0x80);
write_rtc_register(0x8A,0x80);

write_rtc_register(0x8B,0x00);
write_rtc_register(0x8C,0x80);

write_rtc_register(0x8D,0x80);
write_rtc_register(0x8E,0x80);

in_byte = read_rtc_register(0x06);
Serial.print("YEAR [");

Serial.print(in_byte, HEX);
Serial.println("]");

in_byte = read_rtc_register(0x05);
Serial.print("MONTH [");

Serial.print(in_byte, HEX);
Serial.println("]");

digitalWrite(LED, HIGH);

}
//End Function

void write_rtc_register(char register_name, byte data) 
{
write_register(register_name, data, RTC_CHIPSELECT, HIGH, true, true);
}

char read_rtc_register(char register_name) 
{
return read_register(register_name, RTC_CHIPSELECT, HIGH, false, true);
}

// reads a register
char read_register(char register_name, byte cs_pin, byte cs_active_level, boolean read_high, boolean cpha_trailing)
{
char in_byte;
if(cpha_trailing) 
{
SPCR = (1<<SPE)|(1<<MSTR)|(1<<CPHA)|(0<<SPR1)|(0<<SPR0);
}
else 
{
SPCR = (1<<SPE)|(1<<MSTR)|(0<<CPHA)|(0<<SPR1)|(0<<SPR0);
}
clr = SPCR;
clr = SPDR;
if(read_high) 
{
// need to set bit 7 to indicate a read for the slave device
register_name |= 128;
}
else 
{
// if read low, means A7 bit should be cleared when reading for the slave device
register_name &= 127;
}
// SS is active low
digitalWrite(cs_pin, cs_active_level);
// send the address of the register we want to read first
spi_transfer(register_name);
// send nothing, but here's when the device sends back the register's value as an 8 bit byte
in_byte = spi_transfer(0);
// deselect the device..
if(cs_active_level == HIGH) 
{
digitalWrite(cs_pin, LOW);
}
else 
{
digitalWrite(cs_pin, HIGH);
}
return in_byte;
}

// write to a register
// write_high if true indicates set A7 bit to 1 during a write
void write_register(char register_name, byte data, byte cs_pin, byte cs_active_level, boolean write_high, boolean cpha_trailing)
{
if(cpha_trailing) 
{
SPCR = (1<<SPE)|(1<<MSTR)|(1<<CPHA)|(0<<SPR1)|(0<<SPR0);
}
else 
{
SPCR = (1<<SPE)|(1<<MSTR)|(0<<CPHA)|(0<<SPR1)|(0<<SPR0);
}
clr=SPCR;
clr=SPDR;
// char in_byte;
if(write_high) 
{
// set A7 bit to 1 during a write for this device
register_name |= 128;
}
else 
{
// clear bit 7 to indicate we're doing a write for this device
register_name &= 127;
}
// SS is active low
digitalWrite(cs_pin, cs_active_level);
// send the address of the register we want to write
spi_transfer(register_name);
// send the data we're writing
spi_transfer(data);
if(cs_active_level == HIGH) 
{
digitalWrite(cs_pin, LOW);
}
else 
{
digitalWrite(cs_pin, HIGH);
}
//return in_byte;
}

void loop()
{
byte in_byte;
in_byte = read_rtc_register(0x00);
Serial.print(" SECS=");
Serial.print(in_byte, HEX);
in_byte = read_rtc_register(0x01);
Serial.print(" MINS=");
Serial.print(in_byte, HEX);
in_byte = read_rtc_register(0x02);
Serial.print(" HRS=");
Serial.println(in_byte, HEX);
digitalWrite(LED, LOW);
delay(500);
}