CPU only
Needs many ICs to implement a small system
A microcontroller is a small , low cost computer on-a-chip which usually includes:
An 8 or 16 bit microprocessor (CPU)
A small amount of RAM. I/O pins
Programmable ROM and/or flash memory
Parallel and /or flash memory Timers and signal generators Analog to Digital (A/D) and/or Digital to Analog(D/A) conversion First used in 1975(Intel 8048) The introduction of EEPROM in 1993, allowed microcontrollers to be electrically erased The same year, Atmel introduced the first microcontroller using Flash memory.
The CPU core Memory (both ROM and RAM) Some parallel digital and analog I/O Timer Serial module( for communication) Interrupt module( troubleshooting)
Basic microcontroller architecture
Memory:
RAM ROM Store data and code
CPU :
Mathematical and logical operation Memory units are called Register
Analog to Digital Converter (ADC) :
Needs to convert analog signal to digital signal for processing Not so fast and accurate Atmega8 contains 10 bit approximation ADC Internal and external reference voltage can used Result may from differ 2% to 3% Absolute accuracy can be achieved by using external ADC
Block Diagram Of Microcontroller:
Microcontroller Programming
Writing a program which is executed while the microcontroller runs. Can be written in assembly, C or Basic
Assembly :
Takes up least amount of spaces Best result in terms of speed
C:
Easier to write and understand Slower than Assembly
Basic :
Nearest a mans way of reasoning
Microcontroller understands only hex code Any language must be converted to a equivalent hex code The hex code may differ from architecture to architecture
Hex code generator :
Used to generate the hex codes from the language Avr tools
Simulator :
Shows the internal processor state as well as the outputs Allows input signal to be generated The quickest way of debugging and analyze problem MPLAB Proteus
PERSONAL INFORMATION PRODUCTS: Cell phone, pager, watch, pocket recorder, calculator
LAPTOP COMPONENTS: Mouse, keyboard, modem, fax card, sound card, air conditioner, TV
remote, VCR
HOME APPLIANCES: Door lock, alarm lock, thermostat, air conditioner, TV remote,
refrigerator, exercise equipment, washer/dryer, microwave oven
INDUSTRIAL EQUIPMENT: Temperature/ Pressure controllers, counters, timers, RPM
controllers
TOYS: video games, cars , dolls, etc..