






























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!































Lecture 5: Microprocessors I
Instructor: Dr. Hong Ma
Sept. 26, 2007
Analogy: A Complex Machine with Lots of Knobs
Courtesy of NASA.
Trends in Sensor Architectures
-^
Single processor
distributed processors
The MSP430F2xx Family
Optimized for low-power
and versatility
Modern architecture, simple to program
-^
Many peripheral devices – designed to notrequire input from the CPU
-^
Unified address space, no paging
-^
Device emulates itself
-^
Inexpensive development tools
-^
Highly optimized code, designed for C compiler
-^
Low cost, price >$0.
MSP430F2274 Pinout
Port Functions
Digital input
-^
Digital output
-^
Pulled-up / Pulled-down
-^
Peripheral input / output
-^
Interrupt on edge
Memory Map
Hardware(Switchesand I/O)
“Software”(Instructions forflipping theswitches)
Registers
Hex Numbers and Memory
MSP430 Memory^ • 8-bit addressing
resolution
Bit-wise Operators
Assigning Individual Bits
Configuring Ports
Main(){ ...P1DIR |= BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5;//Set output modeP1SEL |= BIT1 + BIT2;//Output Timer_A1 and Timer_A2P1REN |= BIT6 + BIT7;//Enable pull-up/down resistors
for BIT6 and BIT
P1OUT |= BIT0 + BIT6//Output high on BIT0; Pull-up BIT6P1OUT &= BIT3 + BIT4 + BIT5 + BIT7//Output low on BIT3, BIT4,
and BIT5; Pull-down BIT
...}
Crystal Oscillators
Photo removed due to copyright restrictions.
DCO (Digital Controlled Oscillator)
-^
0 to 16 MHz
-^
Fast start-up <1uS
-^
±3% tolerance
-^
±6% tolerance overtemperature
-^
Factory calibration inFlash
-^
Good enough forUART
-^
Application: watch
Images removed due to copyright restrictions.