Jan-Erik, OK! I'm learning. See I have just enough knowledge to be really=20 dangerous! LOL! Thanks, rich! On 7/19/2014 1:39 PM, Jan-Erik Soderholm wrote: > Also see the "MPLAB=AE XC8 C Compiler User=92s Guide" > chapter "5.3.6 Using SFRs From C Code" that also > has this described. > > From that chapter: > > -------------- > The names of the structures that hold the bit-fields will > typically be those of the corresponding register followed by > "bits". For example, the following shows code that includes > the generic header file, clears PORTA as a whole, sets bit 0 > of PORTA using a bit variable and sets bit 2 of PORTA using > the structure/bit-field definitions. > > #include > void main(void) > { > PORTA =3D 0x00; > RA0 =3D 1; > PORTAbits.RA2 =3D 1; > } > -------------- > > Or using the register and bit in your example code: > > #include > void main(void) > { > PIR1 =3D 0x00; > TMR1IF =3D 1; > PIR1bits.TMR1IF =3D 1; > } > > One reason to use the longer "reg.bit" format is that > a dropdown list with all defined bits is opened as soon > as you hit the dot after "PIR1bits". Well, at least in > MPLAB X, I do not think MPLAB 8 does that... > > Jan-Erik. > > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .