Log in

View Full Version : Accessing SFRs by number



Charles Linquis
- 4th March 2008, 04:52
I am familiar with writing to PORTB.0 with the statement
PORTA.0(8) = X, and I know the TRIS registers work the same way.

My question is, can I access ALL the SFRs this way? For example
can I read the TOSU register with the statement
X = PORTA.0(127) ?

Charles Linquis
- 4th March 2008, 06:11
I realized that I'm reading bits, not bytes. Ignore the post.