09-04-2011, 10:46 AM
PRESENTED BY
QUAMAR RAZA
[attachment=11903]
WHAT IS MICROCONTROLLER ?
A microcontroller is a computer-on-a-chip, or, if you prefer, a single-chip computer. Micro suggests that the device is small, and controller tells you that the device might be used to control objects, processes, or events.
Another term to describe a microcontroller is embedded.
controller, because the microcontroller and its support circuits are often built into, or embedded in, the devices they control. DEFINATION
A microcontroller (also microcomputer, MCU or µC) is a small computer on a single integrated circuit consisting internally of a relatively simple CPU, clock, timers, I/O ports, and memory. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM.
MICRONCONTROLLER ORIGIN
The first computer system on a chip optimised for control applications - microcontroller was the Intel 8048 released in 1975, with both RAM and ROM on the same chip. This chip would find its way into over one billion PC keyboards, and other numerous applications.
Most microcontrollers at this time had two variants. One had an erasable EEPROM program memory, which was significantly more expensive than the PROM variant which was only programmable once.
TYPES OF MICROCONTROLLERS
8051
ARM processors (from many vendors) using ARM7 or Cortex-M3 cores are generally microcontrollers
STMicroelectronics STM8S (8-bit), ST10 (16-bit) and STM32 (32-bit)
Atmel AVR (8-bit), AVR32 (32-bit), and AT91SAM
Freescale ColdFire (32-bit) and S08 (8-bit)
Hitachi H8, Hitachi SuperH
Hyperstone E1/E2 (32-bit, First full integration of RISC and DSP on one processor core [1996]
MIPS (32-bit PIC32)
NEC V850
PIC (8-bit PIC16, PIC18, 16-bit dsPIC33 / PIC24)
PIN DISCRIPTION
Pin 40 provides supply voltage to the chip. The voltage source is +5V.
Pin 20 is the ground.
The 8051 has an on-chip oscillator but requires an external clock to run it. Usually, a quartz crystal oscillator is connected to inputs XTAL1 (pin19) and XTAL2 (pin18).
There are various speeds of 8051 family. Speed refers to the maximum oscillator frequency connected to XTAL. When the 8051 is connected to a crystal oscillator and is powered up, the frequency can be observed on the XTAL2 pin using the oscilloscope.
RESET
Pin9 is the reset pin. It is an input and is active high. Upon applying a high pulse to this pin, the microcontroller will reset and terminate all the activities. This is often referred to as a power-on reset.
EA (External access)
Pin 31 is EA. It is an active low signal. It is an input pin and must be connected to either Vcc or GND but it cannot be left unconnected.
PSEN (Program store enable)
This is an output pin.
ALE (Address latch enable)
This is an output pin and is active high.
Ports 0, 1, 2 and 3
The four ports P0, P1, P2 and P3 each use 8 pins, making them 8-bit ports. All the ports upon RESET are configured as input, since P0-P3 have value FFH on them.
Port 0 is also designated as AD0-AD7, allowing it to be used for both address and data. ALE indicates if P0 has address or data.
Port 3:
Port 3 occupies a total of 8 pins, pins 10 through 17. It can be used as input or output.
FEATURES
Compatible with MCS-51Ô Products
4 Kbytes of In-System Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles
Fully Static Operation: 0 Hz to 24 MHz
Three-Level Program Memory Lock
128 x 8-Bit Internal RAM
Programmable I/O Lines
Two 16-Bit Timer/Counters
Six Interrupt Sources
Programmable Serial Channel
Low Power Idle and Power Down Modes
APPLICATIONS
It provides many functions (CPU, RAM, ROM, I/O, interrupt logic, timer, etc.) in a single package
8-bit ALU, Accumulator and 8-bit Registers; hence it is an 8-bit microcontroller
8-bit data bus - It can access 8 bits of data in one operation
16-bit address bus - It can access 216 memory locations - 64 KB each of RAM and ROM
On-chip RAM - 128 bytes (data memory)
On-chip ROM - 4 kByte (program memory)
Four byte bi-directional input/output port
UART (serial port)
Two 16-bit Counter/timers
Two-level interrupt priority