PDA

View Full Version : Shiftin/Shiftout



paul.mcallister
- 11th May 2005, 03:49
Hi all,

I wish to use an LTC1298 12 bit ACD converter. This device uses a serial interface. It is possible to tie the Dout and Din pins together and communicate via a single port for both input and output.

So, here is my question. I want to use a PortB i/o line. I currently have PortB set up as all outputs with the pull up resisitors enabled. If I want to read the LTC1298 with a Shiftin, do I first have to reconfigure the one PortB line as an input prior to issuing this command, or will issueing the command be enough ? The Pic manual doesn't say and a search of the archives didn't turn up any clues. I am using PIC 18F876

Thanks, Paul

mister_e
- 11th May 2005, 04:24
Usually PBP will set the pin itself. BUT if you feel safer to use INPUT PORTB.X before your Shiftin statement... give a go.

Be carefull if you tie Do and DI... should isolate the DO pin with a diode with a pull down resistor.