ds1302 rtc

techie001

New Member
My question is how do you read and write to and from the ds1302 rtc with a 68hc11. The ds1302 has 1 bi directional i/o pin, while the 68hc11 requires that when using the spi pd3 mosi to write, and pd2 miso to read.
 
The DS1302 has 3 interface pins , not just the I/O but CE and SCLK as well.

If you google on " DS1302 Interface" you will see how its done.
 
My question is how do you read and write to and from the ds1302 rtc with a 68hc11. The ds1302 has 1 bi directional i/o pin, while the 68hc11 requires that when using the spi pd3 mosi to write, and pd2 miso to read. The HC11 PD4 would connect to the sclk pin of the rtc, and any available output pin on the h11 would connect to ce. But the hc11 requires pd3 to write to a slave devices mosi, and pd2 to read data from a slave device miso. having only 1 i/o pin on the ds1302 is confusing.
Thanks for the advice ill google on ds1302 interface.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…