1 out of 1 members found this post helpful.
Did you find this post helpful?

|
Re: PIC12F675 triso question?
First of all it is TRISIO and not TRISO. You missed the I.
Then the general case is that registers are 8 bit wide. But in the 12F675 case you have access to only the least 5 bits.
So the best way to define TRISIO is to use the 8 bit format, although 5 bits will work fine too like this:
TRISIO=%00011100 is the same as TRISIO=%11100 and that would set GPIO.0 and GPIO.1 as outputs while GPIO.2, GPIO.3 and GPIO.4 as inputs.
The rest does not matter since 675 does not have that pins I/O.
It is like the numbers, 05 is the same as 5, right?
Hope this is clear.
Ioannis
Bookmarks