I am trying to connect my PIC to RTC. The RTC I am using is DS1302 with only one pin for both (Input and Output). I am trying to simulate it using PROTEUS. The problem I am facing is how can I connect PIC two pins i.e. SDO and SDI to one pin (I/O) of RTC?
ScreenShot is here
If i make SDO or SDI pin somehow "IN-ACTIVE" for a time then maybe i can succesffuly comunicate b/w PIC and RTC. By the term "In-Active" i means that i make let say SDO pin disable (while recieving byte) i.e. making SDO Neither Input Nor Output for a certain time. How can i achieve this goal.
I have read the datasheet of 16fxxxx but couldn't find the configuration for 3 wire communication.
Now it is correct. During first byte transfer SPI slave decide to obtain control on IO or not. If you are reading some value, you send read command, next byte IO switching from 3-state to output and MOSI (SDO) signal becames ignored due to high resistance compare to IO because of resistor.