James Cameron wrote 2014-07-23 04:20: >> T1CONbits.T1GINC =3D 0; >> T1CONbits.TMR1GE =3D 0; >> T1CONbits.T1CKPS =3D 0b11; >> T1CONbits.T1OSCEN =3D 0; >> T1CONbits.T1SYNC =3D 0; >> T1CONbits.TMR1CS =3D 0; >> T1CONbits.TMR1ON =3D 1; > > Yes, I guessed that both were possible, and for multiple bit fields > there is some advantage, but apart from that is there any other reason > for using the longer form over the shorter form? > Mostly readability of the code, as I see it. One source line instead of 2, 3 or 4 lines. And XC8 generates different assembler code. For the one-bit-at-a-time format it always genereates separata BCF/BSF instructions. For the combined format it generates AND/OR instructions (with for setting "0000" or "1111" is shorter then 4 BCF/BSF). > Is there a form where this can be written: > > T1CKPS =3D 0b11; > I think I wrote that I didn't found any. You need the "REGISTERbits." format, it seems. David Duffy (AVD) wrote 2014-07-23 04:39: > BTW, You can use CTRL+Space to show you the possible options after > typing up to the decimal point. > David... > In MPLABX I only have to type the dot and the dropdown list of available options opens automaticly. --=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 .