Professional Documents
Culture Documents
Embedded System???...
Hardware is driven and controlled by software
Software runs in a computer system
(Micro
Microcontroller
A smaller computer. On-chip RAM, ROM, I/O ports... Example:- Motorolas 6811, Intels 8051 and PIC 16X
CPU
RAM
ROM
A single chip
I/O Port Timer Serial COM Port
Microcontroller
Ground
Digital clock
7 segment display
Traffic Light
Timers/Counters
General 8051 has 2 timer: o Two 16-bit timer o The counters are divided into two 8-Bit registers called the timer low (TL0, TL1) and high (TH0, TH1) bytes. o All counters action is controlled by bit states in the timer mode control register (TMOD), the timer/counter control register (TCON), and certain program instructions.
Interrupts
Definition of Interrupt
Event that disrupts the normal execution of a
Interrupts in 8051
EA ET2 ES ET1 EX1 ET0 EX0
Internal Interrupts
Enables or disables external interrupt Enables or disables timer 0 overflow interrupt Enables or disables external interrupt 1 Enables or disables timer 1 overflow interrupt Enables or disables the serial port interrupt Enables or disables timer 2 overflow or capture
Not implemented, reserved for future use Disables all interrupts
Softwares Used
Keil Vision
combines project management, make facilities, source code editing, program debugging, and complete simulation in one powerful environment. The Vision development platform is easy-to-use and helping you quickly create embedded programs that work. The Vision editor and debugger are integrated in a single application that provides a seamless embedded project development environment.
A beginner can learn about 8051 based embedded solutions without any hardware. An experienced designer, you may find most of the required facilities built in the simulator that enabling you to complete your next project without waiting for the target hardware.
What is AVR ?
Modified Harvard architecture 8-bit RISC single chip microcontroller Complete System-on-a-chip On Board Memory (FLASH, SRAM & EEPROM) On Board Peripherals Advanced (for 8 bit processors) technology Developed by Atmel in 1996 First In-house CPU design by Atmel
Features of ATmega16
16K BYTES of In-System Programmable Flash 512 BYTES of In-System Programmable EEPROM 1K Bytes SRAM Analog Comparator Watchdog SPI 2 8-bit Timers plus prescaler 16-bit Timer with extra features 4 PWM 8 channel 10-bit ADC UART 2-wire byte orientated serial interface Low power and Idle modes, External and External interrupts, selectable on-chip Oscillator