Microcontrollers. vs Microprocessors

Size: px
Start display at page:

Download "Microcontrollers. vs Microprocessors"

Transcription

1 Microcontrollers vs Microprocessors

2 Microprocessors Arbitrary computations Arbitrary control structures Arbitrary data structures Specify function at high-level and use compilers and debuggers Composed of three parts Data-path: data manipulation and storage Control: determines sequence of actions executed in data-path and interactions to be had with environment Interface: signals seen by the environment of the processor Instruction execution engine: fetch/execute cycle Flow of control determined by modifications to program counter Instruction classes: Data: move, arithmetic and logical operations Control: branch, loop, subroutine call Interface: load, store from external memory CSE 466 Microcontrollers 2

3 Microprocessor basics (cont d) Can implement arbitrary state machine with auxiliary data-path Control instructions implement state diagram Registers and ALUs act as data storage and manipulation Interaction with the environment through memory interface How are individual signal wires sensed and controlled? CSE 466 Microcontrollers 3

4 Microprocessor organization Controller Inputs: from ALU (conditions), instruction read from memory Outputs: select inputs for registers, ALU operations, read/write to memory Data-path Register file to hold data Arithmetic logic unit to manipulate data Program counter (to implement relative jumps and increments) Interface Data to/from memory (address and data registers in data path) Read/write signals to memory (from control) CSE 466 Microcontrollers 4

5 General-purpose processor Programmed by user New applications are developed routinely General-purpose Must handle a wide range of applications Interacts with environment through memory All devices communicate through memory data DMA operations between disk and I/O devices Dual-ported memory (e.g., display screen) Generally, oblivious to passage of time CSE 466 Microcontrollers 5

6 Microcontrollers (uc) Executes a single program (or a limited suite) with few parameters Task-specific Can be optimized for a specific application Interacts with environment in many ways Direct sensing and control of signal wires Communication protocols to environment and other devices Real-time interactions and constraints Power-saving modes of operation to conserve battery power Closer to system on chip much more integrated in same die / package Processor core + co-processors + memory Flash for program memory, RAM for data memory, special registers to interface to outside world ADC, sometimes DAC Parallel I/O ports to sense and control wires PWM (a simple form of DAC) Timer units to measure time in various ways Communication subsystems to permit direct links to other devices Increasingly, will see radios, MEMS sensors, in package with uc CSE 466 Microcontrollers 6

7 Microcontrollers (cont d) Other features not usually found in general-purpose CPUs Expanded interrupt handling capabilities Multiple interrupts with priority and selective enable/disable Automatic saving of context before handling interrupt Interrupt vectoring to quickly jump to handlers More instructions for bit manipulations Support operations on bits (signal wires) rather than just words Integrated memory and support functions for cheaper system cost Built-in Flash and RAM CSE 466 Microcontrollers 7

8 Typical general-purpose architecture CPU Memory Display (with dual-port video RAM) system bus I/O (serial line, keyboard, mouse) Disk Network Interface Sound Interface standard interfaces all the parts around the processor are usually required CSE 466 Microcontrollers 8

9 Typical task-specific architecture medium-speed interactions General Purpose I/O Microcontroller (CPU+mem+ ) A/D-D/A Conversion low-speed interactions Special I/O Device Driver Flash Timers RAM Custom Logic (now rare) high-speed interactions standard interface any of the parts around the microcontroller are optional CSE 466 Microcontrollers 9

10 How does this change things? Sense and control of environment Processor must be able to read and write individual wires Controls I/O interfaces directly Measurement of time Many applications require precise spacing of events in time Reaction times to external stimuli may be constrained Communication Protocols must be implemented by processor Integrate I/O device or emulate in software Capability of using external device when necessary CSE 466 Microcontrollers 10

11 Block diagram of processor (Harvard) Register transfer view of Harvard architecture Separate busses for instruction memory and data memory Example: PIC 16 load path OP REG AC store path rd wr data Data Memory (16-bit words) N Z 16 addr Control FSM 16 OP IR PC data Inst Memory (8-bit words) addr 16 CSE 466 Microcontrollers 11

12 Block diagram of processor (Princeton) Register transfer view of Princeton / von Neumann architecture Single unified bus for instructions, data, and I/O Example: MSP load path OP REG 16 AC 16 store path rd wr data Data Memory (16-bit words) Control FSM N Z 16 IR 16 8 PC 16 addr MAR Memory Address Register OP 16 CSE 466 Microcontrollers 12

13 The MSP430: Introduction

14 MSP430: An Introduction The MSP430 family Technology Roadmap Typical Applications The MSP430 Documentation MSP430 Architecture MSP430 Devices MSP430 RISC core CSE 466 Microcontrollers 14

15 The Family Broad family of TI s 16-bit microcontrollers from 1Kbytes ROM, 128 bytes RAM (approx. $1 ) to 256Kbytes ROM, 16Kbytes RAM ( $10) Many subfamilies MSP430x1xx: Flash/ ROM based MCUs offer 1.8V to 3.6V operation, up to 60kB, 8MIPs with Basic Clock. MSP430F2xx: 16 MHz. integrated on-chip oscillator, internal pullup/pull-down resistors MSP430x4xx: 120kB/ Flash/ ROM 8MIPS with FLL + SVS, integrated LCD controller MSP430x5xx: 25 MIPS, 1.8 to 3.6V, Power Management Module for optimizing power consumption, 2x memory CSE 466 Microcontrollers 15

16 Part numbering convention CSE 466 Microcontrollers 16

17 MSP430 Roadmap Performance Device Production Sampling Development Future F20xx 1xx-Catalog 8 MIPS 1-60KB F21x1 F22xx F261x F241x F23x-F24x F23x0 F/C41x 5xx-Next Gen 25 MIPS KB USB-RF F21x2 F15x-F16x F13x-F14x F12xx F/C11xx Fx42x0 Integration Fx42x F44x F5xx F563x USB F543x F5xx RF F471x7 2xx-Catalog 16 MIPS 1-120KB 500nA Stand By CG461x Fx43x FG461x F47x4 4xx-LCD 8/16 MIPS 4-120KB LCD Driver F = Flash C = Custom ROM

18 MSP430 Typical Applications Handheld Measurement Air Flow measurement Alcohol meter Barometer Data loggers Emission/Gas analyser Humidity measurement Temperature measurement Weight scales Medical Instruments Blood pressure meter Blood sugar meter Breath measurement EKG system Utility Metering Gas Meter Water Meter Heat Volume Counter Heat Cost Allocation Electricity Meter Home environment Air conditioning Control unit Thermostat Boiler control Shutter control Meter reading system (RF) Irrigation system White goods (Washing machine,..) Sports equipment Altimeter Bike computer Diving watches Security Glass break sensors Door control Smoke/fire/gas detectors Misc Smart card reader Taxi meter Smart Batteries CSE 466 Microcontrollers 18

19 MSP430 modes of operation Active mode (AM) All clocks are active Low-power mode 0 (LPM0) CPU is disabled MCLK is disabled Low-power mode 1 (LPM1) DCO's dc-generator is disabled if DCO not used in active mode Low-power mode 2 (LPM2) SMCLK disabled DCO's dc-generator remains enabled Low-power mode 3 (LPM3) DCO's dc-generator is disabled Low-power mode 4 (LPM4) ACLK is disabled Crystal oscillator is stopped CSE 466 Microcontrollers 19

20 MSP 430 Modular Architecture CSE 466 Microcontrollers 20

21 JTAG Joint Test Action Group (originally created standard) Now IEEE or 5 wire debugging / test interface MSP430 uses JTAG as primary development interface & for test Writing Flash Debugger JTAG: serial sequence of commands and responses Emulation tool translates ops from host into a sequence of JTAG commands TAP: Test Access Port Good article on JTAG & Spi-Bi-Wire CSE 466 Microcontrollers 21

22 Spy-Bi-Wire Goal: JTAG functionality with only 2 wires Re-use existing JTAG blocks Serialized JTAG SBWTIDO shared with reset pin /RST SBWTCK must be held low for a while to enable /RST CSE 466 Microcontrollers 22

23 Embedded Emulation Real-time in-system debug No application resources used Full speed execution H/W breakpoints Single stepping Complex triggering Trace capability Easy to use tools Spy Bi-Wire 2-wire debug interface No pin function impact JTAG

24 Embedded Emulation Module (EEM) MSP430 implements an embedded emulation module (EEM) accessed and controlled through JTAG. In general (varies by MSP430 part #), the following features are available: Non intrusive code execution with real time breakpoint control Single step, step into and step over functionality Full support of all low-power modes Support for all system frequencies, for all clock sources Up to eight (device dependent) hardware triggers/breakpoints on memory address bus (MAB) or memory data bus (MDB) Up to two (device dependent) hardware triggers/breakpoints on CPU register write accesses CSE 466 Microcontrollers 24

25 USB Flash Emulation Tool (FET) MSP430 FET: real-time debug and programming tool Supports ALL MSP430 devices 4-wire JTAG 2-wire Spy Bi-Wire Available with socketed target board Example: MSP-FET430U14 = FET Interface + 14-pin target board Supported by all MSP430 IDEs

26 ez430-f2013 Development Tool Complete development tool that fits in your pocket Supports MSP430F20xx devices only MSP430F20xx devices available in DIP Unrestricted programming and debugging Fast, easy to use operation Includes IAR Kickstart IDE Supported by CCE V2 $20

27 Digital I/O Independently programmable individual I/Os Port1 Port2 Port3 Port6 Function Select Register PxSEL yes yes Up to 6 ports (P1 P6) Each has 8 I/O pins Each pin can be configured as input or output P1. P2. P3. 7 Interrupt Edge Select Register PxIES Interrupt Enable Register PxIE Interrupt Flag Register PxIFG Direction Register PxDIR Output Register PxOUT Input Register PxIN yes yes yes yes yes yes no no no yes yes yes P1 and P2 pins can be configured to assert an interrupt request P4. P5. P6. CSE 466 Microcontrollers 27

28 Watchdog Timer WDT module performs a controlled system restart after a software problem occurs Can serve as an interval timer (generates interrupts) WDT Control register is password protected Note: Powers-up active CSE 466 Microcontrollers 28

29 Example 1: msp430x20x3_1.c // MSP430F20xx Demo - Software Toggle P1.0 #include <msp430x20x3.h> void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR = 0x01; // Set P1.0 to output direction for (;;) { volatile unsigned int i; P1OUT ^= 0x01; // Toggle P1.0 using XOR i = 50000; // Delay do (i--); while (i!= 0); } } WDTCTL: Watch Dog Timer ConTroL WDTPW: WDT PassWord WTDHOLD: WDT Hold P1DIR: Port 1 DIRection P1OUT: Port 1 OUTput state CSE 466 Microcontrollers 29

30 Example 2: msp430x20x3p1_01.c // MSP430F20xx Demo - Software Poll P1.4, Set P1.0 if P1.4 = 1 // Desc: Poll P1.4 in a loop, if hi P1.0 is set, if low, P1.0 reset. // ACLK = n/a, MCLK = SMCLK = default DCO #include <msp430x20x3.h> void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR = 0x01; // Set P1.0 to output direction while (1) // Test P1.4 { if ((0x10 & P1IN)) P1OUT = 0x01;// if P1.4 set, set P1.0 else P1OUT &= ~0x01; // else reset } } CSE 466 Microcontrollers 30

31 MSP430 Memory Model Not present in F2013 SFR: Special Function Registers CSE 466 Microcontrollers 31

32 Memory Organization CSE 466 Microcontrollers 32

33 End of lecture CSE 466 Microcontrollers 33

34 Recall from last time Example 2: msp430x20x3p1_01.c // MSP430F20xx Demo - Software Poll P1.4, Set P1.0 if P1.4 = 1 // Desc: Poll P1.4 in a loop, if hi P1.0 is set, if low, P1.0 reset. // ACLK = n/a, MCLK = SMCLK = default DCO #include <msp430x20x3.h> void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR = 0x01; // Set P1.0 to output direction while (1) // Test P1.4 { if ((0x10 & P1IN)) P1OUT = 0x01;// if P1.4 set, set P1.0 else P1OUT &= ~0x01; // else reset } } CSE 466 Microcontrollers 34

35 Questions about example 2 Q: Why does (0x10 & P1IN) test P1.4? A: 0x10 is hexadecimal notation for 16: 0x10 = 1* *16 0 = 16 (base 10) Converting hex to binary is easy, that s why hex is useful in embedded systems: each hex digit maps straight onto 4 bits: The 1 (high digit) becomes 0001 The 0 (low digit) becomes 0000 Concatenating, we get 0x10 = b In the binary representation, bit 4 (counting from 0) is high This mask is how you select only pin 4 of port 1 Note: MSP430 header files define constants BIT0, BIT1, etc: BIT0 = b = 1 in base 10 BIT1 = b = 2 in base 10 BIT2 = b = 4 in base 10 etc CSE 466 Microcontrollers 35

36 Question about example 2 Q: Why use this ORing notation P1OUT = 0x01 to set the low bit of P1, instead of just P1OUT = 0x01? A: By ORing the value in, we don t modify any of the other bits of P1 there may be other pieces of code that want other bits of P1 to be in a certain state Discuss: what s the analogous technique to CLEAR a single bit, leaving the other bits unchanged? CSE 466 Microcontrollers 36

37 MSP 430 Architecture: A Closer Look CSE 466 Microcontrollers 37

38 F2013-specific peripherals Ports P1 (8 bit port) and 2 bits of P2 Any pin can function as input or output, and generate an interrupt Individually programmable pull up & pull down resistors for each pin Clock: the usual, plus VLO (Very Low frequency Oscillator) Timer_A2 Timer_A2 is a 16-bit timer/counter with two capture/compare registers. Timer_A2 can support multiple capture/compares, PWM outputs, and interval timing. Timer_A2 also has extensive interrupt capabilities. Interrupts may be generated from the counter on overflow conditions and from each of the capture/compare registers. USI (MSP430F20x2 and MSP430F20x3) The universal serial interface (USI) module is used for serial data communication and provides the basic hardware for synchronous communication protocols like SPI and I2C. SD16_A (MSP430F20x3) The SD16_A module supports 16-bit analog-to-digital conversions. The module implements a 16-bit sigma-delta core and reference generator. In addition to external analog inputs, internal VCC sense and temperature sensors are also available. CSE 466 Microcontrollers 38

39 Basic Clock System Basic Clock Module provides the clocks for the MSP430 devices VLO (in MSP430F2xx): 4-20kHz CSE 466 Subsystem Master CLocK Microcontrollers 39

40 Wake up time DCO frequency DCO takes constant number of periods to wake up? CSE 466 Microcontrollers 40

41 Timer_A TASSEL---Timer A Source SELect SMCLK, ACLK, 2 external sources ID --- Input divider /1 /2 /4 /8 MC---Mode Control Continuous Up Down Up/Down TACLR --- Timer A CLeaR TAIE --- Timer A Interrupt Enable TAIFG --- Timer A Interrupt Flag CSE 466 Microcontrollers 41

42 Timer_A Also, Continuous mode (which requires a new Compare value to be set in ISR) CSE 466 Microcontrollers 42

43 Timer_A F2013 has Timer_A2 2 CCR channels TAR Timer A Register 16 bit counter TASSEL Timer A Source SELect TAIFG Timer A Interrupt FlaG raised when counter = 0 TACCRn TA Capture Compare Register Capture: when event occurs, record TAR value in TACCR1 Circles: signals that can be made external Compare: generate event when TAR=TACCR1 CSE 466 Microcontrollers 43

44 Timer_A Timer_A is a 16-bit timer/counter with multiple capture/compare registers (2 in F2013) Capture external signals Compare PWM mode CSE 466 Microcontrollers 44

45 Example 3: msp430x20x3_ta_01.c // MSP430F20xx Demo - Timer_A, Toggle P1.0, CCR0 Cont. Mode ISR, DCO SMCLK // Description: Toggle P1.0 using software and TA_0 ISR. Toggles every // SMCLK cycles. SMCLK provides clock source for TACLK. // During the TA_0 ISR, P1.0 is toggled and clock cycles are added to // CCR0. TA_0 ISR is triggered every cycles. CPU is normally off and // used only during TA_ISR. // ACLK = n/a, MCLK = SMCLK = TACLK = default DCO #include <msp430x20x3.h> void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1DIR = 0x01; // P1.0 output CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 50000; TACTL = TASSEL_2 + MC_2; // SMCLK, contmode _BIS_SR(LPM0_bits + GIE); // Enter LPM0 w/ interrupt } // Timer A0 interrupt service routine #pragma vector=timera0_vector interrupt void Timer_A (void) { P1OUT ^= 0x01; // Toggle P1.0 CCR0 += 50000; // Add Offset to CCR0 } CSE 466 Microcontrollers 45

46 MSP430 CPU Introduction RISC architecture with 27 instructions and 7 addressing modes. Orthogonal architecture with every instruction usable with every addressing mode. 16-bit address bus allows direct access and branching throughout entire memory range; no paging 16-bit data bus allows direct manipulation of word-wide arguments. Constant generator provides six most used immediate values and reduces code size. Direct memory-to-memory transfers without intermediate register holding. Word and byte addressing and instruction formats. Compact silicon 30% smaller than an 8051 saves power and cost CSE 466 Microcontrollers 46

47 MSP430 register properties Large 16-bit register file eliminates single accumulator bottleneck, reduces fetches to memory. Full register access including program counter, status registers, and stack pointer. Single-cycle register operations. CSE 466 Microcontrollers 47

48 MSP430 Registers CSE 466 Microcontrollers 48

49 Registers: PC (R0) Each instruction uses an even number of bytes (2, 4, or 6) PC is word aligned (the LSB is 0) Format: OP SRC, DST ; NB, a lot of processors use DST,SRC MOV #LABEL,PC ; Branch to address LABEL MOV LABEL,PC ; Branch to address contained in LABEL ; Branch indirect, indirect R14 CSE 466 Microcontrollers 49

50 Registers: SP (R1) Stack pointer for return addresses of subroutines and interrupts Stack is in general purpose RAM (unlike e.g. PIC) SP is word aligned (the LSB is 0) Pushing a single byte on the stack wastes a byte the byte at the wasted location is not modified by the push Contrast with single-byte register operations, which zero the unused byte SP points to most recently added word (not to next free word) Starts from top of memory (0x0280 in F2013) In assembly, you must initialize the SP yourself! Don t try to jump in to an initialization subroutine to set up the SP if the SP is not set up before the subroutine call, you won t return properly from the initialization subroutine! CSE 466 Microcontrollers 50

51 Registers: SP (R1) Example stack manipulations: MOV 2(SP),R6 ; Item I2 > R6 2(SP) means 2+SP MOV R7,0(SP) ; Overwrite TOS with R7 PUSH #0123h ; Put 0123h onto TOS POP R8 ; R8 = 0123h Highest RAM address is 0x0280 in F2013 TOS: Top Of Stack TOS is actually the lowest address in the stack! CSE 466 Microcontrollers 51

52 Registers: SR (R2) C: SR(0) Carry Z: SR(1) Zero N: SR(2) Negative (==msb of result) GIE: SR(3) Global interrupt enable CPUOff: SR(4) LPM control OSCOff: SR(5) LPM control SCG0: SR(6) System Clock Generator 0 LPM control SCG1: SR(7) System Clock Generator 0 LPM control V: SR(8) signed overflow CSE 466 Microcontrollers 52

53 Example: msp430x20x3_1.asm.cdecls C,LIST, "msp430x20x3.h" ; text ; Progam Start ; RESET mov.w #0280h,SP ; Initialize stackpointer StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT SetupP1 bis.b #001h,&P1DIR ; P1.0 output ; Mainloop xor.b #001h,&P1OUT ; Toggle P1.0 Wait mov.w #50000,R15 ; Delay to R15 L1 dec.w R15 ; Decrement R15 jnz L1 ; Delay over? jmp Mainloop ; Again ; ; ; Interrupt Vectors ; sect ".reset" ; MSP430 RESET Vector.short RESET ;.end CSE 466 Microcontrollers 53

54 Status bits NB: in MSP430, mov operations do not affect status register CSE 466 Microcontrollers 54

55 Demo interlude, including debugger! CSE 466 Microcontrollers 55

56 End of lecture CSE 466 Microcontrollers 56

57 Constant Generators As source register addressing mode in the instruction word CPE/EE 421/521 Microcomputers 57

58 Constant generator examples Address Assembled instr Viewed in debugger ; Original user s asm code 0xF81C: 434F CLR.B R15 ; mov.b #0,R15 0xF81E: 435F MOV.B #1,R15 ; mov.b #1,R15 0xF820: 436F MOV.B #2,R15 ; mov.b #2,R15 0xF822: 407F 0003 MOV.B #0x0003,R15 ; mov.b #3,R15 0xF826: 426F MOV.B #4,R15 ; mov.b #4,R15 0xF828: 407F 0080 MOV.B #0x0080,R15 ; mov.b #80h,R15 0xF82C: 407F 007F MOV.B #0x007f,R15 ; mov.b #7Fh,R15 0xF830: 430F CLR.W R15 ; mov.w #0,R15 0xF832: 431F MOV.W #1,R15 ; mov.w #1,R15 0xF834: 432F MOV.W #2,R15 ; mov.w #2,R15 0xF836: 403F 0003 MOV.W #0x0003,R15 ; mov.w #3,R15 0xF83A: 422F MOV.W #4,R15 ; mov.w #4,R15 0xF83C: 403F 0080 MOV.W #0x0080,R15 ; mov.w #80h,R15 0xF840: 433F MOV.W #-1,R15 ; mov.w #0xFFFF,R15 Move operations that can use the constant generator assemble to 1 word Move operations that cannot use the constant generator assemble to 2 words CSE 466 Microcontrollers 58

59 CISC / RISC Instruction Set Good summary of MSP430 instructions: CSE 466 Microcontrollers 59

60 27 Core RISC Instructions Notes: -.b or.w: byte or word - add / addc: without/with carry - dadd: decimal add w/ carry (bin. coded decimal math) swpb: swap bytes sxt: sign extend (copies sign bit from b7 to b15-b8 for converting signed byte into signed word) rra: Roll right rrc: Roll right, through carry CSE 466 Microcontrollers 60

61 Emulated Instructions CSE 466 Microcontrollers 61

62 51 Total Instructions CSE 466 Microcontrollers 62

63 Example 2: msp430x20x3_p1_01.asm ;*******************************************************************************.cdecls C,LIST, "msp430x20x3.h" ; text ; Program Start ; RESET mov.w #0280h,SP ; Initialize stackpointer StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT SetupP1 bis.b #001h,&P1DIR ; P1.0 output Mainloop bit.b #010h,&P1IN ; P1.4 hi/low? jc ON ; jmp--> P1.4 is set ; OFF bic.b #001h,&P1OUT ; P1.0 = 0 / LED OFF jmp Mainloop ; ON bis.b #001h,&P1OUT ; P1.0 = 1 / LED ON jmp Mainloop ; ; ; ; Interrupt Vectors ; sect ".reset" ; MSP430 RESET Vector.short RESET ;.end CSE 466 Microcontrollers 63

64 Double operand instructions CSE 466 Microcontrollers 64

65 Single Operand Instruction CSE 466 Microcontrollers 65

66 Jump Instructions CSE 466 Microcontrollers 66

67 3 Instruction Formats CSE 466 Microcontrollers 67

68 Addressing Modes CSE 466 Microcontrollers 68

69 Register Addressing Mode CSE 466 Microcontrollers 69

70 Register-Indexed Addressing Mode Useful for implementing arrays above, 100h is the base address of the source array, and the contents of R4 are the index of the source array. Difference between C and MSP430 assembly: in assembly bytes are indexed, even if we re dealing with an array of words of larger in C, the index counts the items, whatever size they are CSE 466 Microcontrollers 70

71 Symbolic Addressing Mode mov.w LoopCtr, R6 ; load word LoopCtr into R6, symbolic mode becomes mov.w X(PC),R6 ; load word LoopCtr into R6, symbolic mode Where X = LoopCtr PC --- calc done by assembler Could also be called PC relative Gives a relative addressing scheme that can be used to create positionindependent code. Less useful in flash-based systems than RAM-based (since moving code is very costly in time and energy for flash). CSE 466 Microcontrollers 71

72 Absolute Addressing Mode mov.b &P1IN,R6 ; load byte P1IN into R6, abs mode becomes mov.b P1IN(SR),R6 ; load byte P1IN into R6, abs mode SR returns 0 in this case a kind of constant generator fn CSE 466 Microcontrollers 72

73 SP-relative Not claimed as an addressing mode by TI some other manufacturers call this a distinct addressing mode mov.w 2(SP),R6 ; most recent word but one from stack CSE 466 Microcontrollers 73

74 Register Indirect Addressing Mode Memory at addr held in R4 is moved into R5 This mode can t be used for destination addresses, only source Instead, need to use indexed addressing for destination: CSE 466 Microcontrollers 74

75 Register Indirect Autoincrement Addressing Mode Inverse operation: mov.w R6,0(R5) ; store word from R6 into addr 0+(R5)=4 incd.w R5 ; R5 += 2 CSE 466 Microcontrollers 75

76 Immediate Addressing Mode Equivalent to ; load immediate word 1234h into R6 DW 1234h ; CSE 466 Microcontrollers 76

77 MSP430 example peripherals CSE 466 Microcontrollers 77

78 Comparator_A (see also Comparator_A+) Comparator_A is an analog voltage comparator Compares analog input voltage to a reference voltage Useful for slope analogto-digital conversions Supply voltage supervision, and Monitoring of external analog signals. CSE 466 Microcontrollers 78

79 SAR ADCs CSE 466 Microcontrollers 79

80 ADC10 10 bit ADC SAR (Successive Approximation Register) Fast ~200k samples per sec (ksps) Binary chopping CSE 466 Microcontrollers 80

81 ADC12 High-performance 12-bit analog-todigital converter More than 200 Ksamples/sec Programmable sample & hold 8 external input channels Internal storage CSE 466 Microcontrollers 81

82 Sigma-Delta ADC CSE 466 Microcontrollers 82

83 SD16_A Sigma-Delta ADC 16 bits of precision Slow Example application: metering CSE 466 Microcontrollers 83

84 USART Serial Port The universal synchronous/ asynchronous receive/transmit (USART) peripheral interface supports two serial modes with one hardware module UART or SPI (Synchronous Peripheral Interface) modes Double-buffered Baud-rate generator CSE 466 Microcontrollers 84

85 USI module 8 or 16 bit shift register that can output data streams HW to ease I2C or SPI communication 3 wire SPI mode support I2C mode support Slave operation in LPM4 no internal clock required CSE 466 Microcontrollers 85

86 End of lecture CSE 466 Microcontrollers 86

Block diagram of processor (Harvard)

Block diagram of processor (Harvard) Block diagram of processor (Harvard) Register transfer view of Harvard architecture Separate busses for instruction memory and data memory Example: PIC 16 load path OP REG AC 16 16 store path rd wr data

More information

Alex Milenkovich 1. CPE/EE 421 Microcomputers: The MSP430 Introduction. Outline

Alex Milenkovich 1. CPE/EE 421 Microcomputers: The MSP430 Introduction. Outline Outline CPE/EE 421 Microcomputers: The MSP430 Introduction Instructor: Dr Aleksandar Milenkovic Lecture Notes MSP430: An Introduction The MSP430 family Technology Roadmap Typical Applications The MSP430

More information

CPE/EE 421 Microcomputers

CPE/EE 421 Microcomputers CPE/EE 421 Microcomputers Instructor: Dr Aleksandar Milenkovic Lecture Note S09 *Material used is in part developed by Dr. D. Raskovic and Dr. E. Jovanov CPE/EE 421/521 Microcomputers 1 Performance Outline

More information

What is an Interrupt?

What is an Interrupt? MSP430 Interrupts What is an Interrupt? Reaction to something in I/O (human, comm link) Usually asynchronous to processor activities interrupt handler or interrupt service routine (ISR) invoked to take

More information

CPE 323: MSP430 Timers

CPE 323: MSP430 Timers CPE 323: MSP430 Timers Aleksandar Milenkovic Electrical and Computer Engineering The University of Alabama in Huntsville milenka@ece.uah.edu http://www.ece.uah.edu/~milenka Outline Watchdog Timer TimerA

More information

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview Aleksandar Milenkovic Electrical and Computer Engineering The University of Alabama in Huntsville milenka@ece.uah.edu

More information

Interrupts CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

Interrupts CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan CS4101 嵌入式系統概論 Interrupts Prof. Chung-Ta King Department of Computer Science, Taiwan Materials from MSP430 Microcontroller Basics, John H. Davies, Newnes, 2008 Inside MSP430 (MSP430G2551) 1 Introduction

More information

Lecture 5: MSP430 Interrupt

Lecture 5: MSP430 Interrupt ECE342 Intro. to Embedded Systems Lecture 5: MSP430 Interrupt Ying Tang Electrical and Computer Engineering Rowan University 1 How A Computer React to Inputs? Polling: the processor regularly looks at

More information

MSP430 Interrupts. Change value of internal variable (count) Read a data value (sensor, receive) Write a data value (actuator, send)

MSP430 Interrupts. Change value of internal variable (count) Read a data value (sensor, receive) Write a data value (actuator, send) MSP430 Interrupts What is an Interrupt? Reaction to something in I/O (human, comm link) Usually asynchronous to processor activities interrupt handler or interrupt service routine (ISR) invoked to take

More information

Designing for Ultra-Low Power with MSP430

Designing for Ultra-Low Power with MSP430 Designing for Ultra-Low Power with MSP430 Christian Hernitscheck MSP430 FAE Europe Texas Instruments 2006 Texas Instruments Inc, Slide 1 Agenda Introduction to Ultra-Low Power Looking for Ultra-Low Power

More information

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2 1. Block diagram of MSP430x5xx series micro-controller --------------------- 1 2. CPU architecture of MSP430x5xx ------------------------------------------------

More information

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA) CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA) Aleksandar Milenković Email: milenka@uah.edu Web: http://www.ece.uah.edu/~milenka Objective Introduce MSP430 Instruction Set Architecture (Class of ISA,

More information

Timers and Clocks CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

Timers and Clocks CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan CS4101 嵌入式系統概論 Timers and Clocks Prof. Chung-Ta King Department of Computer Science, Taiwan Materials from MSP430 Microcontroller Basics, John H. Davies, Newnes, 2008 Recall the Container Thermometer Container

More information

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction. AVR XMEGA TM Product Introduction 32-bit AVR UC3 AVR Flash Microcontrollers The highest performance AVR in the world 8/16-bit AVR XMEGA Peripheral Performance 8-bit megaavr The world s most successful

More information

Lab 1: I/O, timers, interrupts on the ez430-rf2500

Lab 1: I/O, timers, interrupts on the ez430-rf2500 Lab 1: I/O, timers, interrupts on the ez430-rf2500 UC Berkeley - EE 290Q Thomas Watteyne January 25, 2010 1 The ez430-rf2500 and its Components 1.1 Crash Course on the MSP430f2274 The heart of this platform

More information

Lab 4: Interrupt. CS4101 Introduction to Embedded Systems. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

Lab 4: Interrupt. CS4101 Introduction to Embedded Systems. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan CS4101 Introduction to Embedded Systems Lab 4: Interrupt Prof. Chung-Ta King Department of Computer Science, Taiwan Introduction In this lab, we will learn interrupts of MSP430 Handling interrupts in MSP430

More information

MSP430. More on MSP430

MSP430. More on MSP430 MSP430 More on MSP430 CodeComposer TI recently launched Code Composer Essentials v3. This IDE s latest version (version 3) supports all available MSP430 devices. The new features of CCE v3 include: - Free

More information

Chapter 1 MSP430 Microcontroller Family

Chapter 1 MSP430 Microcontroller Family Chapter 1 1-1 Introduction 1.1 Introduction The MSP430 is a 16-bit microcontroller that has a number of special features not commonly available with other microcontrollers: Complete system on-a-chip includes

More information

Timer Module Timer A. ReadMeFirst

Timer Module Timer A. ReadMeFirst Timer Module Timer A ReadMeFirst Lab Folder Content 1) ReadMeFirst 2) TimerModule Lecture material 3) PinOutSummary 4) InterruptsVectorTable 5) Source code for screencast Interrupt Review Overview A Timer

More information

Before next weeks lab:

Before next weeks lab: Before next weeks lab: - To sign in to lab computers use student and Phys319. - read the lab manual for week two. - look at the tools installation guide for OS of your choice and/or lab computer guide,

More information

MICROPROCESSOR BASED SYSTEM DESIGN

MICROPROCESSOR BASED SYSTEM DESIGN MICROPROCESSOR BASED SYSTEM DESIGN Lecture 5 Xmega 128 B1: Architecture MUHAMMAD AMIR YOUSAF VON NEUMAN ARCHITECTURE CPU Memory Execution unit ALU Registers Both data and instructions at the same system

More information

Hacettepe University

Hacettepe University www.msp430.ubi.pt MSP430 Teaching Materials Introductory Overview Week2 Hacettepe University Outline Microcontrollers Versus Microprocessors Central Processing Unit System Buses Memory Organization I/O

More information

PHYS 319. Things to do before next week's lab Whirlwind tour of the MSP430 CPU and its assembly language Activity 1.

PHYS 319. Things to do before next week's lab Whirlwind tour of the MSP430 CPU and its assembly language Activity 1. PHYS 319 Things to do before next week's lab Whirlwind tour of the MSP430 CPU and its assembly language Activity 1. Before next week's lab: Read manual for Lab 2 and your OS setup guide then prepare your

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring 2019 Lecture #22: MSP430F5529 Operating Mode & the WDT

ECE2049: Embedded Computing in Engineering Design C Term Spring 2019 Lecture #22: MSP430F5529 Operating Mode & the WDT ECE2049: Embedded Computing in Engineering Design C Term Spring 2019 Lecture #22: MSP430F5529 Operating Mode & the WDT Reading for Today: User's Guide 1.4, Ch 16 Reading for Next Class: Review all since

More information

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) (Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all

More information

MIDTERM#1. 2-(3pts) What is the difference between Von Neumann & Harvard processor architectures?

MIDTERM#1. 2-(3pts) What is the difference between Von Neumann & Harvard processor architectures? CSE421-Microprocessors & Microcontrollers-Spring 2013 (March 26, 2013) NAME: MIDTERM#1 1- (2pts) What does MSP stand for in MSP430? Why? Mixed Signal Processor. It contains both analog and digital circuitry.

More information

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang, Network Embedded Systems Sensor Networks Fall 2013 Hardware Marcus Chang, mchang@cs.jhu.edu 1 Embedded Systems Designed to do one or a few dedicated and/or specific functions Embedded as part of a complete

More information

Create and Add the Source File

Create and Add the Source File IAR Kickstart Procedure Create and Add the Source File 8. Create the Source File From the IAR Embedded Workbench menu bar, select File New File. In the untitled editor window that appears, type the following

More information

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 03 Low Power Mode and Port Interrupts Goals: Bonus: Pre Lab Questions:

More information

Lab 4 Interrupts ReadMeFirst

Lab 4 Interrupts ReadMeFirst Lab 4 Interrupts ReadMeFirst Lab Folder Content 1) ReadMeFirst 2) Interrupt Vector Table 3) Pin out Summary Objectives Understand how interrupts work Learn to program Interrupt Service Routines in C Language

More information

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and

More information

2002 Mixed Signal Products SLAU056B

2002 Mixed Signal Products SLAU056B User s Guide 22 Mixed Signal Products SLAU56B IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements,

More information

CONTENTS: Program 1 in C:

CONTENTS: Program 1 in C: CONTENTS: 1) Program 1 in C (Blink) 2) Program 2 in C (Interrupt ) 3) ADC example 4) Addressing Modes 5) Selected Assembly instructions 6) ADC10 register descriptions Program 1 in C: /* * PHYS319 Lab3

More information

Question Bank Microprocessor and Microcontroller

Question Bank Microprocessor and Microcontroller QUESTION BANK - 2 PART A 1. What is cycle stealing? (K1-CO3) During any given bus cycle, one of the system components connected to the system bus is given control of the bus. This component is said to

More information

Lecture test next week

Lecture test next week Lecture test next week Write a short program in Assembler doing. You will be given the print outs of all the assembler programs from the manual You can bring any notes you want Today: Announcements General

More information

Texas Instruments Mixed Signal Processor Tutorial Abstract

Texas Instruments Mixed Signal Processor Tutorial Abstract Texas Instruments Mixed Signal Processor Tutorial Abstract This tutorial goes through the process of writing a program that uses buttons to manipulate LEDs. One LED will be hard connected to the output

More information

Lecture 2 MSP430 Architecture. Atul Lele Ramakrishna Reddy

Lecture 2 MSP430 Architecture. Atul Lele Ramakrishna Reddy Lecture 2 MSP430 Architecture Atul Lele Ramakrishna Reddy About me Education B.E. in Electronics and Telecommunication, PICT, Pune (2000) Professional experience Working with Texas Instruments India Pvt

More information

Hacettepe University

Hacettepe University MSP430 Teaching Materials Week 3 Further into the MSP430 Hacettepe University Copyright 2009 Texas Instruments All Rights Reserved MSP430MtFaFbMc Mt: Memory Type C: ROM F: Flash P: OTP E: EPROM (for developmental

More information

CPU: SOFTWARE ARCHITECTURE INSTRUCTION SET (PART

CPU: SOFTWARE ARCHITECTURE INSTRUCTION SET (PART General Introduction CPU: SOFTWARE ARCHITECTURE INSTRUCTION SET (PART 1) General Introduction (1/5): On Instructions Instruction operate with data or with the flow of the program The following information

More information

Chapter 7 Central Processor Unit (S08CPUV2)

Chapter 7 Central Processor Unit (S08CPUV2) Chapter 7 Central Processor Unit (S08CPUV2) 7.1 Introduction This section provides summary information about the registers, addressing modes, and instruction set of the CPU of the HCS08 Family. For a more

More information

CPE 325: Embedded Systems Laboratory Laboratory #7 Tutorial MSP430 Timers, Watchdog Timer, Timers A and B

CPE 325: Embedded Systems Laboratory Laboratory #7 Tutorial MSP430 Timers, Watchdog Timer, Timers A and B CPE 325: Embedded Systems Laboratory Laboratory #7 Tutorial MSP430 Timers, Watchdog Timer, Timers A and B Aleksandar Milenković Email: milenka@uah.edu Web: http://www.ece.uah.edu/~milenka Objective This

More information

Basic System Memory Architecture View (Functional)

Basic System Memory Architecture View (Functional) Memory Organization Basic System Memory Architecture View (Functional) Notation: [FFFE]=27h FFFE: 27 Basic Characteristics (1/3) Memory cell registers are one byte wide Memory Word is the contents of the

More information

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller of 8085 microprocessor 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration 8-bit

More information

ECE PRACTICE EXAM #2 Clocks, Timers, and Digital I/O

ECE PRACTICE EXAM #2 Clocks, Timers, and Digital I/O ECE2049 -- PRACTICE EXAM #2 Clocks, Timers, and Digital I/O Study HW3, Class Notes, Davies Ch 2.6, 5.8, 8, 9.2-3, 9.7, MSP43F5529 User's Guide Ch 5, 17, 28 Work all problems with your note sheet first

More information

Microcomputer Architecture and Programming

Microcomputer Architecture and Programming IUST-EE (Chapter 1) Microcomputer Architecture and Programming 1 Outline Basic Blocks of Microcomputer Typical Microcomputer Architecture The Single-Chip Microprocessor Microprocessor vs. Microcontroller

More information

6. General purpose Input/Output

6. General purpose Input/Output Chapter 6 6. General purpose Input/Output This chapter starts with a description of one of the simplest integrated peripherals of the MSP430 the General Purpose 8-bit Input Output (GPIO). The Input/Output

More information

Hacettepe University

Hacettepe University MSP430 Teaching Materials Week 5 FUNDAMENTALS OF INTERFACING AND TIMERS for MSP430 Hacettepe University Elements in Basic MCU Interface Power Source Feeds CPU and peripherals Clock Oscillators System synchronization

More information

Intro. MEB/ Texas Instruments Inc, Slide 1

Intro. MEB/ Texas Instruments Inc, Slide 1 Intro MEB/0404 2004 Texas Instruments Inc, Slide 1 MSP430 Agenda Core Architecture Integrated Peripherals Device Roadmap Ideal Applications Development Tools MEB/0404 2004 Texas Instruments Inc, Slide

More information

Interrupts, Low Power Modes

Interrupts, Low Power Modes Interrupts, Low Power Modes Registers Status Register Interrupts (Chapter 6 in text) A computer has 2 basic ways to react to inputs: 1) polling: The processor regularly looks at the input and reacts as

More information

LECTURE - 4 Programming MSP430 using Code Composer Studio(CCS)

LECTURE - 4 Programming MSP430 using Code Composer Studio(CCS) LECTURE - 4 Programming MSP430 using Code Composer Studio(CCS) Atul Lele, Ramakrishna Reddy K, MSP430 Design, Texas Instruments India Pvt Ltd. 2/16/2012 1 Outline of today s session What have we learnt

More information

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers Lecture (4) Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers Prof. Kasim M. Al-Aubidy Philadelphia University-Jordan DERTS-MSc, 2015 Prof. Kasim Al-Aubidy 1 Lecture Outline:

More information

5xx Active & Low Power Mode Operation

5xx Active & Low Power Mode Operation 5xx Active & Low Power Mode Operation 38 Lab 2: ULP Operation Lab Goals Learn ULP Best Practices Learn & understand how to configure two key modules of the 5xx to achieve ultra-low power operation. Power

More information

Microcontrollers. Microcontroller

Microcontrollers. Microcontroller Microcontrollers Microcontroller A microprocessor on a single integrated circuit intended to operate as an embedded system. As well as a CPU, a microcontroller typically includes small amounts of RAM and

More information

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller. UNIT V -8051 MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS 1. What is micro controller? Micro controller is a microprocessor with limited number of RAM, ROM, I/O ports and timer on a single chip

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 04 Timer Interrupts Goals: Learn about Timer Interrupts. Learn how to

More information

Department of Electronics and Instrumentation Engineering Question Bank

Department of Electronics and Instrumentation Engineering Question Bank www.examquestionpaper.in Department of Electronics and Instrumentation Engineering Question Bank SUBJECT CODE / NAME: ET7102 / MICROCONTROLLER BASED SYSTEM DESIGN BRANCH : M.E. (C&I) YEAR / SEM : I / I

More information

Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core

Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core TKT-3500 Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core Erno Salminen Copyright notice Some figures by Robert Reese, from supplementary CD of the course book from PIC18F8722 Family

More information

Copyright 2009 Texas Instruments All Rights Reserved

Copyright 2009 Texas Instruments All Rights Reserved MSP430 Teaching Materials Week 3 Further into the MSP430 Hacettepe University Anatomy of a Typical Small Microcontroller Central processing unit Arithmetic logic unit (ALU), which performs computation.

More information

Wireless Sensor Networks (WSN)

Wireless Sensor Networks (WSN) Wireless Sensor Networks (WSN) Operating Systems M. Schölzel Operating System Tasks Traditional OS Controlling and protecting access to resources (memory, I/O, computing resources) managing their allocation

More information

The 16-bit timer/counter register, TAR, increments or decrements (depending on mode of operation) with each rising edge of the clock signal.

The 16-bit timer/counter register, TAR, increments or decrements (depending on mode of operation) with each rising edge of the clock signal. Timer & Real Time Clock (RTC), PWM control, timing generation and measurements. Analog interfacing and data acquisition: ADC and Comparator in MSP430, data transfer using DMA. Case Study: MSP430 based

More information

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15 Microcontrollers/ TI MSP430F5438A ECE 480 senior Design Team 3 Application Note By: Miriel Garcia 4/3/15 Abstract Microcontrollers are key components on today s modern world. These devices have the ability

More information

FIFTH SEMESTER B.TECH DEGREE EXAMINATION MODEL TEST QUESTION PAPER, NOVEMBER CS 305: Microprocessor and Microcontrollers PART A

FIFTH SEMESTER B.TECH DEGREE EXAMINATION MODEL TEST QUESTION PAPER, NOVEMBER CS 305: Microprocessor and Microcontrollers PART A Reg No Name FIFTH SEMESTER B.TECH DEGREE EXAMINATION MODEL TEST QUESTION PAPER, NOVEMBER 2017 CS 305: Microprocessor and Microcontrollers Max. Marks: 100 Duration: 3 Hours PART A Answer all questions.

More information

Hacettepe University

Hacettepe University MSP430 Teaching Materials Week 5 FUNDAMENTALS OF INTERFACING AND TIMERS for MSP430 Hacettepe University Elements in Basic MCU Interface Power Source Feeds CPU and peripherals Clock Oscillators System synchronization

More information

These three counters can be programmed for either binary or BCD count.

These three counters can be programmed for either binary or BCD count. S5 KTU 1 PROGRAMMABLE TIMER 8254/8253 The Intel 8253 and 8254 are Programmable Interval Timers (PTIs) designed for microprocessors to perform timing and counting functions using three 16-bit registers.

More information

Interconnects, Memory, GPIO

Interconnects, Memory, GPIO Interconnects, Memory, GPIO Dr. Francesco Conti f.conti@unibo.it Slide contributions adapted from STMicroelectronics and from Dr. Michele Magno, others Processor vs. MCU Pipeline Harvard architecture Separate

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #11: More Clocks and Timers

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #11: More Clocks and Timers ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #11: More Clocks and Timers Reading for Today: Davie's Ch 8.3-8.4, 8.9-8.10, User's Guide Ch. 17 Reading for Next Class: User's

More information

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director AVR XMEGA TM A New Reference for 8/16-bit Microcontrollers Ingar Fredriksen AVR Product Marketing Director Kristian Saether AVR Product Marketing Manager Atmel AVR Success Through Innovation First Flash

More information

8051 Overview and Instruction Set

8051 Overview and Instruction Set 8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different

More information

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud. Chapter 1 Microprocessor architecture ECE 3130 Dr. Mohamed Mahmoud The slides are copyright protected. It is not permissible to use them without a permission from Dr Mahmoud http://www.cae.tntech.edu/~mmahmoud/

More information

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs. acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.) Module 0 Introduction Introduction to Embedded Systems, Real Time

More information

DERTS Design Requirements (1): Microcontroller Architecture & Programming

DERTS Design Requirements (1): Microcontroller Architecture & Programming Lecture (5) DERTS Design Requirements (1): Microcontroller Architecture & Programming Prof. Kasim M. Al-Aubidy Philadelphia University 1 Lecture Outline: Features of microcomputers and microcontrollers.

More information

063[[[0LFURFRQWUROOHUV /RZ3RZHU0RGHV &3($GYDQFHG0LFURFRPSXWHU7HFKQLTXHV 'U(PLO-RYDQRY /RZ3RZHU. Power: A First-Class Architectural Design Constraint

063[[[0LFURFRQWUROOHUV /RZ3RZHU0RGHV &3($GYDQFHG0LFURFRPSXWHU7HFKQLTXHV 'U(PLO-RYDQRY /RZ3RZHU. Power: A First-Class Architectural Design Constraint 063[[[0LFURFRQWUROOHUV /RZ3RZHU0RGHV &3($GYDQFHG0LFURFRPSXWHU7HFKQLTXHV 'U(PLO-RYDQRY MSP430 low power concepts 1 /RZ3RZHU Power: A First-Class Architectural Design Constraint Trevor Mudge, IEEE Computer,

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

Microcontroller basics

Microcontroller basics FYS3240 PC-based instrumentation and microcontrollers Microcontroller basics Spring 2017 Lecture #4 Bekkeng, 30.01.2017 Lab: AVR Studio Microcontrollers can be programmed using Assembly or C language In

More information

15.1 Timer_A Introduction

15.1 Timer_A Introduction Chapter 15 is a 16-bit timer/counter with multiple capture/compare registers. This chapter describes. This chapter describes the operation of the of the MSP430x4xx device family. Topic Page 15.1 Introduction.........................................

More information

8086 Interrupts and Interrupt Responses:

8086 Interrupts and Interrupt Responses: UNIT-III PART -A INTERRUPTS AND PROGRAMMABLE INTERRUPT CONTROLLERS Contents at a glance: 8086 Interrupts and Interrupt Responses Introduction to DOS and BIOS interrupts 8259A Priority Interrupt Controller

More information

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept. Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept. Definition of an E.S. It is a system whose principal function is not computational,

More information

Alex Milenkovich 1. CPE/EE 421 Microcomputers. Course Administration. Review: Outline. Getting Started with EasyWeb2. Review: MSP bit RISC

Alex Milenkovich 1. CPE/EE 421 Microcomputers. Course Administration. Review: Outline. Getting Started with EasyWeb2. Review: MSP bit RISC CPE/EE 421 Microcomputers Instructor: Dr Aleksandar Milenkovic Lecture Note S12 Course Administration Instructor: URL: TA: Labs: Test I: Text: Review: Today: Aleksandar Milenkovic milenka@ece.uah.edu www.ece.uah.edu/~milenka

More information

CPE/EE 323 Introduction to Embedded Computer Systems Homework V

CPE/EE 323 Introduction to Embedded Computer Systems Homework V CPE/EE 323 Introduction to Embedded Computer Systems Homework V 1(15) 2(15) 3(25) 4(25) 5(20) Total Problem #1 (15 points) Power, Low power systems A sensor platform features a microcontroller, a sensor,

More information

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 1 UNIT 1

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 1 UNIT 1 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 1 UNIT 1 1. Embedded Systems Introduction (Definition, Applications and Classification) - 1 2. Elements of Embedded systems ----------------------------------------------------------

More information

Advanced Microcontrollers Grzegorz Budzyń Lecture. 4: 16-bit. microcontrollers

Advanced Microcontrollers Grzegorz Budzyń Lecture. 4: 16-bit. microcontrollers Advanced Microcontrollers Grzegorz Budzyń Lecture 4: 16-bit microcontrollers Plan MSP430 family PIC24 family Introduction MSP430 TI microcontrollersportfolio Source: [1] TI microcontrollersportfolio Source:

More information

Embedded Systems. 3. Hardware Software Interface. Lothar Thiele. Computer Engineering and Networks Laboratory

Embedded Systems. 3. Hardware Software Interface. Lothar Thiele. Computer Engineering and Networks Laboratory Embedded Systems 3. Hardware Software Interface Lothar Thiele Computer Engineering and Networks Laboratory Do you Remember? 3 2 3 3 High Level Physical View 3 4 High Level Physical View 3 5 What you will

More information

b. List different system buses of 8085 microprocessor and give function of each bus. (8) Answer:

b. List different system buses of 8085 microprocessor and give function of each bus. (8) Answer: Q.2 a. Discuss and differentiate between a Microprocessor and a Microcontroller. Microprocessor is an IC which has only the CPU inside them i.e. only the processing powers such as Intel s Pentium 1,2,3,4,

More information

BASIC INTERFACING CONCEPTS

BASIC INTERFACING CONCEPTS Contents i SYLLABUS UNIT - I 8085 ARCHITECTURE Introduction to Microprocessors and Microcontrollers, 8085 Processor Architecture, Internal Operations, Instructions and Timings, Programming the 8085-Introduction

More information

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture Department of Electrical Engineering Lecture 4 The 8051 Architecture 1 In this Lecture Overview General physical & operational features Block diagram Pin assignments Logic symbol Hardware description Pin

More information

2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II

2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II 2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II Instructor: Dr. Hong Ma Oct. 1, 2007 Structure of MSP430 Program 1. Declarations 2. main() 1. Watch-dog timer servicing 2.

More information

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack Course Syllabus: Chapter# Topic Covered Duration MODULE 1 INTRO TO EMBEDDED SYSTEMS 2-1

More information

MSP430 Microcontroller Basics

MSP430 Microcontroller Basics MSP430 Microcontroller Basics John H. Davies AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO Newnes is an imprint of Elsevier N WPIGS Contents Preface

More information

Hacettepe University

Hacettepe University MSP430 Teaching Materials Week 3 Further into the MSP430 Hacettepe University Anatomy of a Typical Small Microcontroller Central processing unit Arithmetic logic unit (ALU), which performs computation.

More information

2006 Mixed Signal Products SLAU049F

2006 Mixed Signal Products SLAU049F User s Guide 2006 Mixed Signal Products SLAU049F Related Documentation From Texas Instruments Preface About This Manual This manual discusses modules and peripherals of the MSP430x1xx family of devices.

More information

// Conditions for 9600/4=2400 Baud SW UART, SMCLK = 1MHz #define Bitime_5 0x05*4 // ~ 0.5 bit length + small adjustment #define Bitime 13*4//0x0D

// Conditions for 9600/4=2400 Baud SW UART, SMCLK = 1MHz #define Bitime_5 0x05*4 // ~ 0.5 bit length + small adjustment #define Bitime 13*4//0x0D /****************************************************************************** * * * 1. Device starts up in LPM3 + blinking LED to indicate device is alive * + Upon first button press, device transitions

More information

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions ECE2049: Embedded Computing in Engineering Design A Term Fall 2018 Lecture #9: Exam Review w/ Solutions Reading for Today: Review all reading and notes, Davies Ch 1, 2, 4,7, MSP430 User's Guide Ch 6.1,

More information

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

More information

Programming in the MAXQ environment

Programming in the MAXQ environment AVAILABLE The in-circuit debugging and program-loading features of the MAXQ2000 microcontroller combine with IAR s Embedded Workbench development environment to provide C or assembly-level application

More information

CN310 Microprocessor Systems Design

CN310 Microprocessor Systems Design CN310 Microprocessor Systems Design Micro Architecture Nawin Somyat Department of Electrical and Computer Engineering Thammasat University 28 August 2018 Outline Course Contents 1 Introduction 2 Simple

More information

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O ECE2049-E17 Lecture 4 1 ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O Administrivia Homework 1: Due today by 7pm o Either place in box in ECE office or give to me o Office hours tonight!

More information

Getting Started with the Texas Instruments ez430

Getting Started with the Texas Instruments ez430 1 of 6 03.01.2009 01:33 HOME Running Your Code>> Getting Started with the Texas Instruments ez430 Working with the Workbench Software Step 1: Each program needs an associated project. The project includes

More information

Organization in Memory

Organization in Memory in 16 addresses for sub-routines Is written once prior to initialization, however it can be changed in chunks of 512 bytes during operation two small blocks programmed via scatt.-fl. only 2kB fast RAM

More information

Micro computer Organization

Micro computer Organization Micro computer Organization I Base Basic Components CPU SYSTEM BUSES VDD CLK RESET 1 MPU vs MCU Microprocessor Unit (MPU) CPU (called Microprocessor) is a die All components external to die Basically on

More information