C
ChronoFish
Hi there,
I don't think I understand the purpose of the TRIS registers. My understanding was that it a mask for output and input.
My target is the 16f84a.
So if I set the trisA to 0x3E (00111110) I would expect only pin 1 to be an output (there is no pin 7 or 8 on portA).
Then if I have a variable that gets incremented and loaded into porta I would expect that pin 1 would flash.
It does.
But what I don't expect is that pins 2-5 flash as well. Yes I know that I'm sending 8 bits to portA, but I thought the purpose of
trisA was to mask the I/O.
Is this another case where I have to "tie down" the inputs with a resistor?
Thanks!
CF
(it may take awhile, but I'll get it eventually.... I hope)
I don't think I understand the purpose of the TRIS registers. My understanding was that it a mask for output and input.
My target is the 16f84a.
So if I set the trisA to 0x3E (00111110) I would expect only pin 1 to be an output (there is no pin 7 or 8 on portA).
Then if I have a variable that gets incremented and loaded into porta I would expect that pin 1 would flash.
It does.
But what I don't expect is that pins 2-5 flash as well. Yes I know that I'm sending 8 bits to portA, but I thought the purpose of
trisA was to mask the I/O.
Is this another case where I have to "tie down" the inputs with a resistor?
Thanks!
CF
(it may take awhile, but I'll get it eventually.... I hope)