MC Unit 1
MC Unit 1
Introduction
Dr.Shobha K R
Professor
Dept of ETE, MSRIT
⚫ Course Objectives
⚫ Provide a basic understanding of microcontroller &
Instruction-set architectures
⚫ Develop skills of Programming MSP430 using assembly/ C
languages
⚫ Teach the details of I/Os, Interrupts & LP modes of MSP430
⚫ Discuss the concepts of clocks and timers in MSP430
⚫ Impart the knowledge of using mixed mode peripherals
and Communication peripherals
Unit II
Architecture of the MSP430 Processor: Central Processing Unit., Addressing Modes, Constant Generator and
Emulated Instructions, Instruction Set, Examples, Reflections on the CPU and Instruction Set, Resets.
Unit III
Digital I/Os, Interrupts and LP Modes: Parallel ports, Interrupts on Inputs, Application: examples of hex keypad,
multiplexed display, LCD and DC motor interfaces. Interrupts and ISRs. Low Power Modes of operation.
Development Environment: Introduction, Aspects of C for Embedded Systems, Access for debugging, MSP430-
starter kit
Unit IV
Clock System & Timers: Clock modules; Crystal oscillators, VLO and DCO, Clock module control, Oscillator
Faults, FLL+.
Timers: Watchdog timer, Basic Timer1, RTC, Timer_A; Timer block, Capture and compare channels, Interrupts,
Example application –Generation of a precise frequency and a simple PWM.
Unit V
Mixed Signal Systems and Communication Interfaces: General and practical issues with ADCs, Architecture
and Basic operations of - The ADC10 Successive-Approximation, Basic introduction to DAC12, Serial Peripheral
Interface, SPI with USCI, Software UART using Timer_A.
Text Books:
1. John H. Davies, MSP430 Microcontroller
Basics, Newnes ,Elsevier, 2008.
2. Cris Nagy, Embedded Systems Design
using the TI MSP430 Series, Newnes,
Elsevier,
2003.
References:
1. www.msp430.com
Address Bus
⚫ A single-chip computer
⚫ On-chip RAM, ROM, I/O ports...
⚫ Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X,
MSP 430
▪ The first four registers have dedicated functions with alternative names,
while the remaining 12 : R4–R15 are GPRs
▪ Either words or bytes can be written to the CPU registers.
▪ The behavior for bytes is different from main memory: The destination is
always the low byte and the high byte is cleared (reset to 0).
⚫ Unfortunately, the conflicting demands for high performance and low power mean
that most modern microcontrollers have much more complicated clocks, often with
two or more sources.
⚫ In many applications
◦ The MCU spends most of its time in a LPM : Upon Interrupt, it runs to handle the event
rapidly.
◦ It is often necessary to keep track of real time, either so that the MCU can wake
periodically, or to time-stamp external events.
⚫ Therefore, two clocks with quite different specifications are often needed:
1. Crystal:
✔ Accurate and stable
✔ Crystals for microcontrollers typically run at either a high
frequency of a few MHz to drive the main bus or a low
frequency of 32,768 Hz for a RTC.
The disadvantages are
• Crystals are expensive and delicate : the oscillator draws a
relatively large current, particularly at high frequency.
• Crystal oscillators also take a long time to start up and stabilize,
often around 105 cycles, which is an unavoidable side effect of
their high stability.
2. RC Oscillator :
▪ Cheap and quick to start but have poor accuracy and stability.
▪ The components can be external / integrated
▪ The quality of integrated RC oscillators has improved dramatically
in
recent years and the F20xx provides four frequencies calibrated
at the factory to within ± 1%.