Using SFR as GPR

Status
Not open for further replies.

Mosaic

Well-Known Member
Folks, i am fresh out of bank 0 gpr, and I need one more byte. 16f886 MCU.
Since I am not using the EUSART can I utilise the RCREG and the TXREG SFRs as regular GPRs?

I note that sfr 08h isn't used in the '886, is this available as a gpr then?

Simulator fails 08h and allows the EUSART TX/RC to be used as GPR.
 
Last edited:
RCREG is a read only register I do believe. However, EEADR and EEDATA I believe can be used as a GPR as long as you don't initiate an EEPROM read/write in your code.
 
The sim is allowing the SSPBUF as well...as I am not using SPI or I2C, there seems to be no impact on the program.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…