whats the difference between TRIS and PORT registers in pic16f877a ??

Status
Not open for further replies.

rangerskm

Full Member level 4
Joined
Jan 23, 2013
Messages
199
Helped
0
Reputation
2
Reaction score
0
Trophy points
1,296
Activity points
2,663
explain it with example
 

Hello
PORTx is the register of the physical pin you see on your PIC
TRISx is the register used for choosing if a PORTx pin should be an input or an output (1 for input & 0 for output)
Every PORTx pin has its corresponding TRISx bit. If you want PORTx bit 6 as an output, TRISx bit 6 should be 0.
I hope that helped
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…