Microcontrollers: A Practical Approach
Microcontrollers: A Practical Approach
A Practical Approach
Ernesto Arroyo
earroyo@media.mit.edu
What is a Microcontroller?
Mini-Computer
– Microprocessor
The Brains
Arithmetic Logic Unit (ALU)
Control Unit
Program/ Data Storage
Peripherals (Input/Output)
Low-Cost
Why Important?
Embedded Inside:
– Automotive systems
– Airplanes
– Toys
– Medical Devices
– Furniture
Billions of units
iSphere
Augmented Reality Kitchen
Augmented Reality Kitchen
Talking Trivet
WaterBot
EyeR
Thermo Mouse Pad
Spatula
Spatula
PIC16F88
Microchip
8 bit
Memory
– 68 bytes of RAM Execution Memory
– 68 bytes of EEPROM Program Memory
Retention > 40 years
2-5.5v
18 Pins
– 13 I/O pins www.microchip.com
I/O
Programming Languages
ASM C
– Low level – Most used
– Full Control – HiTech C
BASIC, Forth, LOGO – Microchip C
– Interpreted – CCS PIC C
– Easy to use
We will this
– Slow
Program Example: Loop
/* pulses pin PORTB<3> /* pulses pin PORTB<3>
eight times */ eight times */
Programming Debugging