Log in

View Full Version : really simple, dumb question



picster
- 3rd March 2007, 17:16
Ok this seems pretty rudimentary - I just wanted to get a quick answer and save me testing this in person.

I'm using a 16F88, and want to use PB2 for hardware UART RX using Darrel's interrupt system to branch when the serial buffer receives a character. The rest of PB I'm using for output. I'll set TRISB=4, and enable the interrupt and all, but my question is, if I later code "PORTB=n", what's the effect on PB2 when this is carried out? Is it ignored for bits that are set as inputs via the TRIS register? Do I have to do a read/modify/write? Will it do anything funky with my RX bit? I didn't want to break it down to bit-by-bit changes, since it's important that the change across the OTHER bits happen synchronously.

Thanks in advance, and sorry for the simplicity of this question.

picster

mister_e
- 3rd March 2007, 22:02
in theory, all bit set to input shouldn't be affected by a PORT write.