Lecture 7: Microcontroller Architecture - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Lecture 7: Microcontroller Architecture

Description:

Emulator connected to JTAG to allow PC communications. MSP430 Flash (ROM) 2KB Flash ... MSP430 - Emulator. Full speed, real time emulation ... – PowerPoint PPT presentation

Number of Views:139
Avg rating:3.0/5.0
Slides: 29
Provided by: rober244
Category:

less

Transcript and Presenter's Notes

Title: Lecture 7: Microcontroller Architecture


1
Lecture 7 Microcontroller Architecture
  • Lecturer
  • Mr Robert Ross

2
Overview
  • Transistor Gate model
  • Equivalent Gate Circuits
  • MSP430 Microcontroller Architecture

3
Microprocessor Elements
  • Microprocessors are not magic
  • They are collections of logic gates which are
    controlled by instructions stored in memory
  • Memory is a collection of logic gates
  • Logic gates are made up of transistors
  • Microprocessors are essentially large,
    reconfigurable state machines

4
Digital Transistor Model
  • The control line (Base) is used to open/close
    switch
  • If voltage applied then switch closes, otherwise
    is open
  • Switch decides state of transistor
  • Open no current flowing through (0 state)
  • Closed current flowing through (1 state)

In (Collector)
Control (Base)
Out (Emitter)
5
Transistor Model - AND Gate
Power Supply
Input 1
Input 2
Output
6
Transistor Model - OR Gate
Power Supply
Input 1
Input 2
Output
7
Transistor Model - NOT Gate
Power Supply
Output
Input 1
8
AND Gate Equivalent
  • AND Gates can be constructed using NAND Gates and
    an Inverters

9
OR Gate Equivalent
  • OR Gates can be constructed using NAND Gates and
    an Inverters

10
NOT Gate Equivalent
  • NOT Gates (inverters) can be constructed using
    NAND Gates

11
Hardware Summary
  • All gates can be expressed as combinations of
    NAND gates
  • Microprocessors can implement all logic functions
    using NAND gates made up from discrete transistors

12
Intro to MSP430 Microcontroller
  • MSP430F2013 Microcontroller
  • Key Features
  • Low power (0.1uA Power Down, 0.8uA Standby) (10
    years off a lithium battery)
  • 16 Bit RISC processor
  • Universal serial interface
  • 2kB Flash, 128B RAM
  • 16 Bit Sigma-Delta ADC
  • Embedded emulation

13
MSP430 Microcontroller Architecture
14
MSP430 - CPU
  • 16-Bit RISC Processor
  • 16 Registers (16 Bit)
  • von Neumann Architecture
  • 51 Assembly Instructions
  • 27 Core
  • 24 Emulated
  • 7 Addressing modes

15
MSP430 Clock System
  • Flexible 3 different clocking sources
  • Low Frequency Crystal Clock (LFXTCLK) External
    low frequency clock 32kHz watch crystal
  • Crystal 2 Clock (XT2CLK) External high speed
    clock - 400kHz to 16MHz
  • Digitally Controlled Oscillator Clock (DCOCLK)
    Internally generated clock. Default clock source
    for the master clock upon reset. Default
    frequency 900kHZ (can be slowed down)
  • Three clock lines different clocks can be used
    by different parts of the system
  • Lower clock speed minimises power consumption

16
MSP430 Spy-Bi Wire
  • TI Proprietary two wire protocol
  • Lower pin count than JTAG (4 pins)
  • The computers interface to the microprocessor

17
MSP430 - JTAG
  • Joint Test Action Group (IEEE 1149.1)
  • Mechanism by which the computer communicates with
    the microprocessor and memory
  • Computer interfaces with JTAG via Spy-Bi Wire
  • Emulator connected to JTAG to allow PC
    communications

18
MSP430 Flash (ROM)
  • 2KB Flash
  • Bit, byte or word programmable
  • Can be programmed via JTAG
  • This is where code is programmed into
  • FCTL1, FCTL2 and FCTL3 are registers to control
    the flash

19
MSP430 - RAM
  • 128 Bytes of RAM
  • Start address 200h
  • Stack Stored in RAM (grows backwards from 0x0280)

20
MSP430 Memory Map
  • Family memory map
  • For the MSP430F2013
  • RAM 0x00200 0x0027F
  • Flash 0xF800 0xFFFF

21
MSP430 A/D Converter
  • 16 Bit Sigma Delta ADC
  • 8 input channels
  • Built in temperature sensor
  • Selectable external or internal (1.2V) reference

22
MSP430 Ports P1P2
  • P1 has 8 GPIO Pins
  • P2 has 2 GPIO Pins
  • All 10 pins are capable of driving interrupts
  • One interrupt vector per port
  • Internal, selectable pull-up/down resistors

23
MSP430 Watchdog Timer
  • In case of a software fault the WDT performs a
    controlled system restart
  • If the selected WDT expires (without being reset
    in software) restart will be initiated

24
MSP430 Timer_A2
  • 16 bit timer
  • Two capture compare registers
  • Used to generate interrupts
  • Supports
  • PWM Generation
  • Interval timing
  • Modes
  • Up Repeatedly counts from 0 to TAACR0
  • Continuous Repeatedly counts from 0 to FFFF
  • Up/Down Repeatedly counts from 0 to TACCR0 then
    back to 0

25
MSP430 - USI
  • Universal Serial Interface
  • Three-wire SPI mode support
  • I2C mode support
  • Selectable Endianness
  • Contains shift register, bit counter and logic to
    facilitate SPI or I2C
  • Programmable clock generation

26
MSP430 - Emulator
  • Full speed, real time emulation
  • Supports breakpoints, single steps and complex
    triggering
  • In-system development (not software model)
  • No application resources required

27
MSP430 Brownout Detection
  • Detects if supply voltage has dropped and
    performs reset.
  • Cleans up mechanically induced voltage
    fluctuations (eg. battery insertion)

28
Summary
  • Transistors are the basic building block for
    microprocessors
  • The MSP430 is a microcontroller which includes a
    CPU, memory and other peripherals like an ADC
  • Next lecture will investigate the architecture of
    the MSP430 CPU
Write a Comment
User Comments (0)
About PowerShow.com