What is the difference between the numbers enclosed and not enclosed?
Question:
Answer:
If the number is enclosed in angle brackets above the bit name, this means that the bit name is defined as a bit SFR by the device file. This means that the name can be used in a program. (Please refer to How to Use This Manual > How to Read This Manual > How to interpret the register format in the hardware manual.)
For example, the ADCEN bit located at bit 5 of the PER0 register can be used as-is in a program.
SET1 ADCEN ; Supply clock to A/D converter (assembler statement)
ADCEN = 1; // Supply clock to A/D converter (C statement)
A bit defined as a bit SFR is an SFR for which bit manipulation is allowed, and the bit has meaning by itself. A program is easier to read when bit names are used instead of bit numbers which are almost meaningless (for example, SFR for interrupt).
SET1 ADMK ; A/D converter interrupt mask (assembler statement)
ADMK = 1; // A/D converter interrupt mask (C statement)
It also makes code porting easier in cases where the bit position (number) changes between subseries. (Example: MK1H.0 in G13 and G14 is MK1L.2 in G12 and MK01H.1 in G10. If you use ADMK, there is no need to change the code.)
RL78 Family |