Myspirtc1.pdf

Hi all,
Because of my specially attitude to picbasic, i want to share little xp.
I had to move from I2C to SPI RTC, i had lack of pins and this would save me one pin.
So i needed hardware driven SPI RTC. There is many true SPI chips, but i decide to use DS1302 with his serial interface.
Addition of one transistor solved the problem to unity SDI and SDO lines by CE line. That way the line remains accessible for other serial
devices. In my case this is FAT32 SD card.
The rest was trivial. I wrote 3 simple procedures to access the chip trough microchip SPI. Well, i had issues to reorder the bytes, because $81 is a 'gay' number (do not read literally ) but that is another topic )
Regards