4. Central Processing Unit (CPU)
A96G150 User's manual
30
4.3
Instruction set
If you need an Instruction table, please refer to Appendix.
Instructions are either 1, 2 or 3 bytes long as listed in the
‘Bytes’
Each instruction takes either 1, 2 or 4 machine cycles to execute.
1 machine cycle comprises 2 CCLK clock cycles.
An M8051EW-specific instruction MOVC @(DPTR++), A is provided to enable software to be
downloaded into Program Memory where this is implemented as RAM. This instruction can
also be used subsequently to modify contents of the Program Memory RAM.
Arithmetic Instruction :
The M8051EW implement ADD, ADDC (Add with Carry), SUBB (Subtract with Borrow), INC
(Increment) and DEC (Decrement) functions, which may be used in most addressing modes.
There are three accumulator-specific instructions, DA A (Decimal Adjust A), MUL AB (Multiply
A by B) and DIV AB (Divide A by B).
Logical Instruction :
The M8051EW implement ANL (AND Logical), ORL (OR Logical), and XRL (Exclusive-OR
Logical) functions, which again may be used in most addressing modes. There are seven
accumulator-specific instructions, CLR A (Clear A), CPL A (Complement A), RL A (Rotate Left
A), RLC A (Rotate Left through Carry A), RR A (Rotate Right A), RRC A (Rotate Right through
Carry A), and SWAP A (Swap Nibbles of A).
Internal data memory :
Data may be moved from the accumulator to any Internal Data Memory location, from any
Internal Data Memory location to the accumulator, and from any Internal Data Memory location
to any SFR or other Internal Data Memory location.
External data memory :
Data may be moved from the accumulator to or from an external memory location in one of
two addressing modes. In 8-bit addressing mode, the external location is addressed by either
R0 or R1; in 16-bit addressing mode, the location is addressed by the DPTR.
Unconditional Jumps :
Four sorts of unconditional jump instructions are available. Short jumps (SJMP) are relative
jumps (limited to
–
128 to +127bytes), Long jumps (LJMP) are absolute 16-bit jumps and
Absolute jumps (AJMP) are absolute 11-bit jumps (ex. within a 2Kbyte memory page). The
last type is an Indexed jump, JMP @A+DPTR, which jumps to a location contained in the
DPTR register, offset by a value stored in the accumulator.
Содержание A96G150
Страница 126: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 126 Figure 43 16 bit Timer Counter Mode Operation Example...
Страница 136: ...12 Timer 0 1 2 3 4 5 A96G150 User s manual 136 Figure 51 16 bit Timer Counter Mode Operation Example...
Страница 147: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 147 Figure 59 16 bit Timer Counter Mode Operation Example...
Страница 157: ...A96G150 User s manual 12 Timer 0 1 2 3 4 5 157 Figure 67 16 bit Timer Counter Mode Operation Example...
Страница 171: ...A96G150 User s manual 14 12 bit ADC 171 Figure 79 ADC Operation Flow Sequence...
Страница 333: ...A96G150 User s manual Revision history 333 Revision history Revision Date Notes 1 00 2022 06 22 First creation...