Module-3 - Part - 1
Module-3 - Part - 1
• Laptop components: mouse, keyboard, modem, fax card, sound card, battery charger
• Home appliances: door lock, alarm clock, thermostat, air conditioner, TV remote, VCR, small
refrigerator, exercise equipment, washer/dryer, microwave oven
Microcontroller :
• A smaller computer
CPU RAM ROM
• On-chip RAM, ROM, I/O ports...
• Physical size of the product is big, no RAM, ROM, I/O on CPU chip itself
• As the peripherals are integrated with a microprocessor the system is more reliable
• Though microcontroller may have on chip ROM, RAM and I/O ports, addition ROM,
RAM I/O ports may be interfaced externally if required
• The INTEL bagged the credit of producing the first Microcontroller 8048 with a CPU and 1K
bytes of EPROM, 64 Bytes of RAM an 8-Bit Timer and 27 I/O pins in 1976.
• Then followed the most popular controller 8051 in the year 1980 with 4K bytes of ROM,128
Bytes of RAM , a serial port, two 16-bit Timers , and 32 I/O pins.
• The 8051 family has many additions and improvements over the years and remains a most
sought after tool for todays circuit designers.
Evolution of Microcontroller
• INTEL introduced a 16 bit controller 8096 in the year 1982
• Later INTEL introduced 80c196 series of 16-bit microcontrollers for mainly industrial
applications
• Microchip, another company has introduced a microcontroller PIC 16C64 an 8-bit in the
year 1985.
• 32-bit microcontrollers have been developed by IBM and Motorola-MPC 505 is a 32-bit
RISC controller of Motorola
(Ref: www.arm.com)
Types of Microcontroller
Types of Microcontroller
• Atmel
• ARM Motorola
•8-bit
• Intel •68HC05
•8-bit •68HC08
•8XC42 •68HC11
•MCS48 •16-bit
•MCS51
•8xC251
•68HC12
•68HC16
•16-bit
•MCS96 •32-bit
•MXS296 •683xx
• National Semiconductor •Texas Instruments
•COP8 •TMS370
• Microchip •MSP430
•12-bit instruction PIC •Zilog
•14-bit instruction PIC •Z8
•PIC16F84 •Z86E02
•16-bit instruction PIC
• NEC
MCS-51 “Family” of Microcontrollers
Feature 8031 8051 8052 8751
ROM NO 4KB 8KB 4KB UV EPROM
RAM (Bytes) 128 128 256 128
TIMERS 2 2 3 2
I/O PINS 32 32 32 32
SERIAL PORTS 1 1 1 1
INTERRUPT 6 6 8 6
SOURCES
8051 Features
• 4K bytes internal ROM
• Serial Data Transmitter and Receiver for Full – Duplex Operation – SBUF.
• PSEN - It is active low O/P signal. It is used to enable external program memory (ROM). When this
is low, then external program memory becomes enabled and microcontroller read content of
external memory location.
• EA - pin is for forcing the controller to use the external program memory. When it is connected to
ground , controller will fetch data from external memory.
• ALE- Address Latch Enable Pin. Using this Pins, external address can be separated from data (as
they are multiplexed by 8051).
• RST- Reset Input Pin. It is an active HIGH Pin i.e. if the RST Pin is HIGH for a minimum of two
machine cycles, the microcontroller will be reset. During this time, the oscillator must be running.
External Memory Access
8051 CPU Registers
• A (8-bit Accumulator)
• I/O Port Latches: P0 (Port 0), P1 (Port 1), P2 (Port 2) and P3 (Port 3)
• Internal RAM of 256 Bytes – The first 128 Bytes of the RAM i.e. 00H to 7FH is again
divided in to 4 banks with 8 registers (R0 – R7) in each bank, 16 bit addressable
registers and 80 general purpose registers.
• The higher 128 Bytes of the RAM i.e. 80H to FFH consists of SFRs or Special Function
Registers. Using SFRs we can control different peripherals like Timers, Serial Port, all
I/O Ports, etc.
On-chip memory Internal RAM
The internal RAM or Data
Memory of the 8051
Microcontroller is divided in to:
1. General Purpose Registers
2. Bit Addressable Registers
3. Register Banks
4. Special Function Registers
or SFRs.
Internal RAM Structure
On-chip memory Internal RAM
• Four register bank each with R0-R7 can be selected using PSW (RS0 and RS1) from 00h – 1Fh,
32 bytes.
• Only 16 bytes are bit addressable out of 128 byte of RAM, from 20H to 2FH.
• These 16 bytes provide 16*8 = 128 bits of RAM bit address ability, addressed from 00H to 7FH.
• Internal RAM location 20h – 2Fh are both bit and byte addressable.