Accessing undefined bits in PIC24

Thread Starter

Peytonator

Joined Jun 30, 2008
105
Hello,

I'm currently using MPLABC30 with a PIC24F16KA102 to do serial comms. I'm trying to use U2TX to transmit a value. But how do I test the UTXBF flag when it's not defined for the U2STA register? Here is the header file for the PIC.

"_UTXBF cannot be defined because it is used by more than one SFR"

So how do I access this bit, or any other bit that is not defined?

I'm not yet learned enough to deal directly with memory structs etc. Help!

Thanks :)
 

AlexR

Joined Jan 16, 2008
732
The header file shows that UTXBF is defined as a bit field in both the U1STA and U2STA registers.

To access it in the U1STA register you use U1STABITS.UTXBF and for the U2STA register you use U2STABITS.UTXBF.
 
Top