INEL 4206 Repaso Examen I
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 1
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 1
Also see Choosing a MCU for your next design; 8 bit or 32 bit? (Atmel)
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 1
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 1
• Binary, hexadecimal, octal, fractions
• Conversion between bases and between bases and decimal
• Addition in binary and 2’s complement
• Binary Coded Decimal (BCD)
• Half-precision floating-point
• Basic terms (byte, word, nibble), ASCII, etc.
Chapter 2: Number Systems
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 1
Chapter 3: Architecture
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
MCUs are more application oriented than MPUs
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
● Hardware Components ● Arithmetic Logic Unit
(ALU) ● Control Unit (CU) ● FSM ● Fetch, decode,
execute ● Set of Registers ● Bus Interface Logic
(BIL)
● Software Components ● Instruction Set ● Addressing Modes
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
● Fetch State: ● PC = address of instruction ● instruction is read ● address -> address bus ● instruction -> data bus ● stored in the instruction register (IR).
● Decoding State: ● instruction meaning is deciphered. ● signals are sent to the appropriate CPU components to execute the
actions specified by the instruction ● Execution State: ● the actions specified by the instruction are carried out ● PC has been incremented to point to the address of the next
instruction in memory.
Fig. 3.4 States in control unit operation: fetch, decode, and execute
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
● Arithmetic operations (ADD, SUBTRACT, COMPLEMENT)
● Logic operations (AND, OR, NOT, XOR) ● SHIFT and ROTATE
ALU
REGISTERS● General purpose (GPR) ● Instruction register (IR) ● Program counter = instruction pointer ● Stack pointer ● Status register
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
REGISTERS● R4-R15 ● General purpose
● R0 = PC ● = Program counter
● SP = Stack pointer ● SR = Status register
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
● Individual bits indicate ALU operation result satisfies a particular condition ● Z = Zero bit or flag ● C = Carry bit ● N = Negative or Sign bit ● V = Overflow bit ● GIE = general interrupt flag ● indicates if interrupts are enabled
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
● A = B = 1 (both chips are disabled) if any of A15,A14,A13,A12,A11,A10,A9’,A8 are 1
● So for A = B = 0 => A15=A14=A13=A12=A11=A10=A9’=A8=0 ● A = B = 0 if Y=0, A0=0 and W/B’=1 ● A=0, B=1 if Y=0, A0=1 and W/B’=0 ● A=1, B=0 if Y=0, A0=0 and W/B’=0
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430 Chapter 3
MSP430 Assembly Language
https://www.ti.com/sc/docs/products/micro/msp430/userguid/as_5.pdf