Roman Black email (remove spam text)
David VanHorn wrote:
> Looking at this further, it appears that the setting and clearing bits in
> the TRIS register is not as simple as I thought.
> I had assumed that I could flip a pin from input to output and back, by bcf
> and bsf instructions on the TRIS registers.
> Apparently this isn't true.
Hmm, read somewhere you have to do a clrf PORTx before doing
the TRIS thing. Maybe in my old 16C84 datasheet, that was
a good one.
I always do tristating like this:
(comment the bits here)
I have never tried using a bsf or bcf for tristating.
http://www.piclist.com hint: To leave the PICList
See also: www.piclist.com/techref/microchip/ios.htm?key=i%2Fo
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the