
Application Note
AN1759
14
and then reads it back out. The data read is put into a RAM buffer on the
HC05. When the emulator is stopped, read the contents of the HC05
RAM buffer to verify the transmission process.
The test routine sequence is shown in
 Figure 15
. The assembly code for
the test routine is provided in the section titled
 Code Listing
.
The sequence of tests is:
1.
Configure the device to turn on a 1-Hz signal on the SQW/OUT
pin.
a.
Transmit a start condition.
b.
Transmit the DS1307 code to write to the device of
%11010000.
c.
Transmit the control register address and then $10.
d.
Transmit a stop condition.
2.
Write start time.
a.
Transmit a start condition.
b.
Transmit the DS1307 code to write to the device of
%11010000.
c.
Transmit the starting address of $00, the seconds register.
d.
Transmit Saturday, June 20, 1998, 4:30:00 p.m. (By writing a
0 to bit 7 of the seconds register, the crystal circuit has been
turned on.)
e.
Transmit a stop condition.
3.
Read time and date, store away to HC05 RAM buffer.
a.
Transmit a start condition.
b.
Transmit the DS1307 code to write to the device of
%11010000.
c.
Transmit the starting address of $00.
d.
Transmit a stop condition.
e.
Transmit a start condition.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
  Go to: www.freescale.com
n
.