Microcontroller Overview Lecture Notes
http://www.media.mit.edu/physics/pedagogy/fab/ucntrl/fabmicronotes.html
What is a Microcontroller?
- Some Families:
- Allows:
- Simple hardware to software interface
- In situ processing (on a PCB, shoe, etc)
- Less ICs (no more digital logic chips)
- Has limited:
- Speed, usually < 5 MIPS
- RAM, ~ 256 bytes
- Program storage, 4K instructions
- Basic Features
- I/O Pins
- Usually digital, some analog (see later)
- Timers
- 8 or 16 bit
- Watchdog (resets/wakes up processor after timeout)
- x Bit operations
- Usually 8, makes 16 (and greater) bit operations slow
- External Addressing
- Gives ability to add extra RAM
- Hardware UART
- Allows for serial line communications
- Can be mimicked in software, but:
- Slower
- Uses a timer
- Cannot trigger interrupt
- ADC/DAC
- Analog to Digital / Digital to Analog Conversion
- Usually 8 bit (up to 16 bits)
- Usually 20us per sample (down to 5)
- Can be multiplexed (4051) for more inputs
- Interrupts
- Allow asynchronous program flow based on external events
- Based on:
- Pin change
- Serial event
- Power low (etc)
- Can wake processor
- Hard to debug
- Flash Programmable
- As opposed to UV erasable (which takes ~15 min)
- Faster prototyping
- Sometimes not available with ADC
- CISC vs. RISC
- CISC
- Different instruction sizes and execution times
- Easier to write assembly language by hand
- RISC
- All instructions same size and (almost) same execution time
- Compiler can usually create smaller code
- Much easier cycle counting
Some processor families: (Click on name for block diagram)
-
PIC (www.microchip.com)
- Usually:
- 18 - 28 pin packages (down to 8) with 14-22 I/O
- ADC available, usually 4 channels, 8 bits
- Max. 5 MIPS
- Hardware UART on heavier chips
- No external addressing
- Excellent general purpose chips
- Ubiquitous around the Lab
-
SH1 7032 (eg of Hitachi SH family) (semiconductor.hitachi.com/superh/)
- Lots of:
- Speed (20 MIPS)
- Bits (32)
- RAM (8K)
- 16 bit timers (5)
- Interrupts (40)
- Power drain (100 mA)
- Pins to solder (100)
-
ADuC812 (www.analog.com/industry/microconverter)
- Fast (5 us) 8 channel, 12 bit ADC
- Hardware UART
- Flash
- But:
- Still good for data collection, smart sensor type application
Edited 11/05/99 by Ari Benbasat
|