MSP430x11x1
MIXED SIGNAL MICROCONTROLLER
SLAS241C ± SEPTEMBER 1999 ± REVISED JUNE 2000
short-form description (continued)
CPU
All sixteen registers are located inside the CPU, providing reduced instruction execution time. This reduces a
Program Counter
Stack Pointer
Status Register
PC/R0
SP/R1
SR/CG1/R2
Four registers are reserved for special use as a program counter, a stack pointer, a status register, and a constant generator. The remaining twelve registers are available as
Peripherals are connected to the CPU using a data address and control buses and can be handled easily with all instructions for memory manipulation.
instruction set
Constant Generator | CG2/R3 |
|
|
|
|
R4 | |
| R5 |
| |
|
|
|
|
R14 | |
| R15 |
| |
|
|
The instructions set for this
Table 1. Instruction Word Formats
Dual operands, | e.g. ADD R4, R5 | R4 + R5 → R5 |
Single operands, destination only | e.g. CALL R8 | PC → (TOS), R8 → PC |
Relative jump, | e.g. JNE | |
|
|
|
Most instructions can operate on both word and byte data. Byte operations are identified by the suffix B.
Examples: | Instructions for word operation | Instructions for byte operation |
| |||||
| MOV |
| EDE,TONI | MOV.B | EDE,TONI |
| ||
| ADD |
| #235h,&MEM | ADD.B | #35h,&MEM |
| ||
| PUSH |
| R5 | PUSH.B | R5 |
|
| |
| SWPB |
| R5 | Ð |
|
|
| |
|
|
| Table 2. Address Mode Descriptions |
|
| |||
|
|
|
|
|
|
|
| |
ADDRESS MODE | s | d |
| SYNTAX | EXAMPLE | OPERATION |
| |
|
|
|
|
|
|
|
|
|
Register | √ | √ |
| MOV Rs, Rd | MOV R10, R11 |
| R10 → R11 |
|
|
|
|
|
|
|
|
| |
Indexed | √ | √ |
| MOV X(Rn), Y(Rm) | MOV 2(R5), 6(R6) | M(2 + R5) → M(6 + R6) |
| |
|
|
|
|
|
|
|
|
|
Symbolic (PC relative) | √ | √ |
| MOV EDE, TONI |
|
| M(EDE) → M(TONI) |
|
|
|
|
|
|
|
|
|
|
Absolute | √ | √ |
| MOV &MEM, &TCDAT |
|
| M(MEM) → M(TCDAT) |
|
|
|
|
|
|
|
|
| |
Indirect | √ |
|
| MOV @Rn, Y(Rm) | MOV @R10, Tab(R6) | M(R10) → M(Tab + R6) |
| |
|
|
|
|
|
|
|
| |
Indirect autoincrement | √ |
|
| MOV @Rn+, RM | MOV @R10+, R11 | M(R10) → R11, R10 + 2 → R10 |
| |
|
|
|
|
|
|
|
|
|
Immediate | √ |
|
| MOV #X, TONI | MOV #45, TONI |
| #45 → M(TONI) |
|
|
|
|
|
|
|
| ||
NOTE: s = source d = destination | Rs/Rd = source register/destination register Rn = register number |
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 | POST OFFICE BOX 655303 •DALLAS, TEXAS 75265 |