Vous êtes sur la page 1sur 28

MSP430G2553 CPU

RealTime TechnoSoft

MSP430

MSP430G2553 CPU Agenda


CPU Feature Registers Addressing Modes Instructions

RealTime TechnoSoft

MSP430G2553 CPU Features

RealTime TechnoSoft

MSP430

CPU Features
Designed for modern programming techniques
Calculated branching, Table processing

RISC Architecture
27 Instruction and 7 addressing modes

Orthogonal architecture
Every instruction usable with every addressing mode

RealTime TechnoSoft

MSP430

CPU Features
Access entire memory range
No paging required

Single-cycle register operations


Predicted execution time

Full register access


Including program counter, status registers, and stack pointer

Direct memory-to-memory transfers without intermediate register holding


Better register utilization

RealTime TechnoSoft

MSP430G2553 Registers

RealTime TechnoSoft

MSP430

CPU Block Diagram:

RealTime TechnoSoft

MSP430

Dedicated RO R1 R2 R3
PC SP

General Purpose R4 R5

SR
CG

. .

R15
RealTime TechnoSoft

MSP430

Program Counter (PC)


PC R0
Holds address of next instruction to execute Holds even number
Since all instructions size are even number (2, 4, 6 bytes)

16bits wide Can address 64KB space

RealTime TechnoSoft

MSP430

Stack Pointer (SP)


SP R1 CPU to store the return addresses
Subroutine/interrupt call

Predecrement, postincrement scheme


PUSH Decrement SP then WRITE POP READ and then Increment SP

RealTime TechnoSoft

MSP430

Status Register (SR) R2

RealTime TechnoSoft

MSP430

Constant Generator (CG)


R3
Stores the constant values used in immediate addressing mode Assembler automatically uses it Source-only register Applications cannot use this register as destination Only assembler could use

RealTime TechnoSoft

MSP430

General-Purpose Registers
R4 to R15 Can be used for Data registers Address pointers or Index values
RealTime TechnoSoft

MSP430G2553 Addressing Modes

RealTime TechnoSoft

MSP430

Addressing Modes

RealTime TechnoSoft

MSP430

Register Addressing Mode


Example: MOV R10,R11

RealTime TechnoSoft

MSP430

Indexed Addressing Modes


Example: MOV 2 (R5) , 6 (R6)

RealTime TechnoSoft

MSP430

Symbolic Mode:
Example: MOV EDE,TONI; EDE = (PC + X) TONI = (PC + Y)

RealTime TechnoSoft

MSP430

Absolute Mode:
Example: MOV &EDE,&TONI ; EDE = 0F016h ; TONI = 01114h

RealTime TechnoSoft

MSP430

Indirect Register Mode:


Example: MOV.B @R10,0(R11)

RealTime TechnoSoft

MSP430

Indirect Auto-Increment Mode:


Example: MOV @R10+,0(R11) ; R10 auto incremented

RealTime TechnoSoft

MSP430

Immediate Mode:
Example: MOV #45h,TONI

RealTime TechnoSoft

MSP430G2553 Instructions

RealTime TechnoSoft

MSP430

Instruction Set:
27core instructions and 24 emulated instructions. Core ins->unique op-codes Emulated-> code easier to write and read

RealTime TechnoSoft

MSP430

Double-Operand:
Word or Byte instruction (.B,.W) Examples: MOV (.B) ADD (.B) SUB (.B) MUL (.W) ADDC (.B)

RealTime TechnoSoft

MSP430

Single-Operand:
Example: RRC (B) RRA (B) SWP (B) PUSH (.B)

RealTime TechnoSoft

MSP430

Jump:
Example: JMP JC JNC JN

RealTime TechnoSoft

Q&A

RealTime TechnoSoft

Vous aimerez peut-être aussi