SlideShare a Scribd company logo
1 of 30
Unit 4
Introduction to Microcontrollers
Presented By,
Amruta Ingle
Assistant Professor
History
• uC developed in 1971 by Intel in US.
• 1st 4-bit uC- i4004 –used for calculator.
Intel 4004 – 1971
4040-
8008
8080
TMS1000 – TI 1974- 1st true uC- combined ROM, RAM, uP, clk onchip
8048 - Intel 1977 –uC with RAM+ROM-8 bit
8051- Intel 1981- uC with RAM+ROM+Timer+serial port- 8bit
8096- Intel 16-bit uC for High speed I/O applications
Microprocessors, need several external
peripherals to be connected, therefore
system cost is high
8051 Microcontroller Architecture
• Features of 8051:
– 8051 microcontroller is designed by Intel in 1981
– Belong to MCS-51 family of Microcontrollers.
– It is an 8-bit microcontroller.
– Data Bus-8 Bits i.e can handle 8-bits of data at a time
– Address Bus-16 Bits i.e. Can access 216 = 64KBytes of
memory (ROM and External RAM)
– It is built with 40 pins DIP (dual inline package)
– 4kb of internal/ on-chip ROM
– 128 bytes of internal/ on-chip RAM
– Two 16-bit timers
– four parallel 8-bit ports, which are programmable as well
as addressable as per the requirement.
– 1 UART for Serial Communication
– On-chip crystal oscillator is integrated in the
microcontroller having crystal frequency of 12 MHz.
8051 Microcontroller Architecture
8051 Pin Description
8051 Pin Description
Port Pins:
Pins 1 to 8 − These pins are known as Port 1. Bi-
directional I/O port. This port doesn’t serve any other
functions.
Pins 10 to 17 − These pins are known as Port 3. This port
serves some functions like interrupts, timer input,
control signals, serial communication signals RxD and
TxD, etc.
Pins 21 to 28 − These pins are known as Port 2. It serves
as I/O port. Higher order address bus signals are also
multiplexed using this port.
Pins 32 to 39 − These pins are known as Port 0. It serves
as I/O port. Lower order address and data bus signals
are multiplexed using this port.
8051 Pin Description
Other Pins:
• Pin 9 − It is a RESET pin, which is used to reset the
microcontroller to its initial values.
• Pins 18 & 19 − These pins are used for interfacing an external
crystal to get the system clock.
• Pin 20 − This pin provides the power supply to the circuit.
• Pin 29 − This is PSEN pin which stands for Program Store
Enable. It is used to read a signal from the external program
memory.
• Pin 30 − This is EA pin which stands for External Access input.
It is used to enable/disable the external memory interfacing.
• Pin 31 − This is ALE pin which stands for Address Latch Enable.
It is used to demultiplex the address-data signal of port.
• Pin 40 − This pin is used to provide power supply to the
circuit.
Registers of 8051
Storage Registers in 8051
• Accumulator
• R register
• B register
• Data Pointer (DPTR)
• Program Counter (PC)
• Stack Pointer (SP)
Registers of 8051
Accumulator:
• The accumulator, register A, is used for all arithmetic and logic
operations. If the accumulator is not present, then every
result of each calculation (addition, multiplication, shift, etc.)
is to be stored into the main memory. Access to main memory
is slower than access to a register like the accumulator
"R" Registers:
• The "R" registers are a set of eight registers, namely, R0, R1 to
R7. These registers function as auxiliary or temporary storage
registers in many operations
"B" Register
• The "B" register is very similar to the Accumulator in the
sense that it may hold an 8-bit (1-byte) value. The "B"
register is used only by two 8051 instructions: MUL
AB and DIV AB.
Registers of 8051
Data Pointer
• The Data Pointer (DPTR) is the 8051’s only user-accessible 16-
bit (2-byte) register. The Accumulator, R0–R7 registers and B
register are 1-byte value registers. DPTR is meant for pointing
to data. It is used by the 8051 to access external memory
using the address indicated by DPTR. DPTR is the only 16-bit
register available and is often used to store 2-byte values.
Program Counter
• The Program Counter (PC) is a 2-byte address which tells the
8051 where the next instruction to execute can be found in
the memory. PC starts at 0000h when the 8051 initializes and
is incremented every time after an instruction is executed.
Registers of 8051
Stack Pointer (SP)
• The Stack Pointer, like all registers except DPTR and PC, may
hold an 8-bit (1-byte) value. The Stack Pointer tells the
location from where the next value is to be removed from
the stack. When a value is pushed onto the stack, the value
of SP is incremented and then the value is stored at the
resulting memory location. When a value is popped off the
stack, the value is returned from the memory location
indicated by SP, and then the value of SP is decremented.
• This order of operation is important.
• SP will be initialized to 07h when the 8051 is initialized.
Registers of 8051
8051 Flag Bits and PSW Register
• The program status word (PSW) register is an 8-bit register,
also known as flag register. It is of 8-bit wide but only 6-bit of
it is used.
• Four of the flags are called conditional flags, which means
that they indicate a condition which results after an
instruction is executed. These four are CY (Carry), AC (auxiliary
carry), P (parity), and OV (overflow).
• The bits RS0 and RS1 are used to change the bank registers.
The following figure shows the program status word register.
Registers of 8051
• PSW
• CY, the carry flag − This carry flag is set (1) whenever there is a carry out from the D7 bit. It is
affected after an 8-bit addition or subtraction operation.
• AC, auxiliary carry flag − If there is a carry from D3 and D4 during an ADD or SUB operation,
the AC bit is set; otherwise, it is cleared.
• P, the parity flag − The parity flag represents the number of 1's in the accumulator register
only. If the A register contains odd number of 1's, then P = 1; and for even number of 1's, P =
0.
• OV, the overflow flag − This flag is set whenever the result of a signed number operation is
too large causing the high-order bit to overflow into the sign bit. Also used to check Timer
overflow.
ROM Space in 8051
• The Program Memory or ROM is a type of non-volatile memory used in
microcontrollers where the code or the program to be executed is stored
using the program counter (PC), like tables or initialization program. Intel
8051 has an internal/ built-in ROM of 4KB and can be extended up to
64KB by using an external program memory.
• External Program Memory
• Internal Program Memory (4KB) i.e.
from 0000H to 0FFFH + External Program
Memory (60KB) i.e. from 1000H to FFFFH.
This mode is selected by making EA = 1.
(Refer to fig.1)
• Total External Program Memory (64KB)
i.e., over the entire range of 0000H to
FFFFH. This mode is selected by making
EA = 0. (Refer to fig.2)
RAM in 8051
• The 128 bytes of RAM inside the 8051 are
assigned the address 00 to 7FH. They can be
accessed directly as memory locations and are
divided into three different groups as follows −
– 32 bytes from 00H to 1FH locations are set aside for
register banks and the stack.
– 16 bytes from 20H to 2FH locations are set aside for
bit-addressable read/write memory.
– 80 bytes from 30H to 7FH locations are used for read
and write storage; it is called as scratch pad. These 80
locations RAM are widely used for the purpose of
storing data and parameters by 8051 programmers.
RAM in 8051
RAM in 8051
RAM in 8051
Register Banks in 8051
• A total of 32 bytes of RAM are set aside for the register
banks and the stack.
• These 32 bytes are divided into four register banks in
which each bank has 8 registers, R0–R7.
• RAM locations from 0 to 7 are set aside for bank 0.
• The second bank of registers R0–R7 starts at RAM
location 08 and goes to locations OFH.
• The third bank of R0–R7 starts at memory location 10H
and goes to location to 17H.
• Finally, RAM locations 18H to 1FH are set aside for the
fourth bank of R0–R7.
8096 Microcontroller Architecture
8096 Microcontroller Architecture
1.The 8096 is a 16-bit microcontroller.
2.The 8096 is designed to use in applications which require high speed calculations
and fast I/O operations.
3.The high speed I/O section of an 8096 includes a 16 bit timer, a 16 bit counter, a
4 input programmable edge detector;
4. software timers, and a 6-output programmable event generator.
5. CPU with 232 byte register file and register ALU
6. 8-Kbyte internal ROM
7. 256 bytes internal RAM
• 8. Two 16-bit Timers/Counters
• 9. A Serial port
• 10. Pulse width modulator
• 11. Watchdog timer
• 12. Eight multiplexed inputs analog to digital converter with 10 bit resolution and
• 13. Memory controller
• 14. It has 100 instructions, which can operate on bit, byte, word, double words.
• It consists of a complete set of 16-bit arithmetic instructions including multiply and
divide operations.
• Logical and arithmetic instructions are available for both byte and word
operations.
8096 Microcontroller Architecture
• 8096 Microprocessor Functional Units
8096 Microcontroller Architecture
• Two main buses (A-bus and D-bus) are used for inter-
processor communication. A-bus is a 8-bit address bus
and D-bus is a 16-bit data bus. The D-bus transfers data
only between the RALU and the register file or special
function registers (SFRs).
• The A-bus provides the addresses for above transfers
or address for multiplexed
address/data bus connecting to the memory controller.
The memory controller provides the addresses for the
internal ROM and external memory.
8096 Microcontroller Architecture
• RALU:
• Instructions to the RALU are taken from the A-Bus and stored
temporarily in the instruction register. The Control Unit
decodes the instructions and generates the correct sequence
of signals to have the RALU perform the desired function.
• It contains a 17-bit ALU, the program status word (PSW), It
contains a 17-bit ALU, the Program Status Word (PSW), the
Program Counter (PC), a loop counter, and three temporary
registers. All of the registers are 16-bits or 17-bits (16 + sign
extension) wide. Some of the registers have the ability to
perform simple operations to off-load the ALU.
8096 Microcontroller Architecture
• 8096 Memory Space:
• The addressable memory space on the 8096
Memory Space consists of 64 K bytes, most of
which is available to the user for program or data
memory.
• Locations which have special purposes are 0000H
through 00FFH and 1FFEH through 2080H.
• All other locations can be used for either program
or data storage or for memory mapped
peripherals.
Microcontroller Applications
• Microcontrollers are intended for embedded devices, in comparison
to the micro-processors which are used in PCs or other all-purpose
devices.
• Microcontrollers are employed in automatically managed
inventions and appliances like- power tools, implantable medical
devices, automobile engine control systems, , office machines,
remote controls appliances, toys and many more embedded
systems.
• By dipping the size and expenditure in comparison to a design that
make use of a different micro-processor, I/O devices and memory,
micro-controllers formulate it inexpensive to digitally control more
& more appliances and operations.
• Mixed signal micro-controllers are general; putting together analog
constituents required controlling non-digital electronic structures.
Microcontroller Applications
Application of Microcontroller in Day to Day Life Devices:
• Light sensing & controlling devices
• Temperature sensing and controlling devices
• Fire detection & safety devices
• Application of Microcontroller in Industrial Control Devices:
• Industrial instrumentation devices
• Process control devices
• Application of Microcontroller in Metering & Measurement Devices:
• Volt Meter
• Measuring revolving objects
• Current meter
• Hand-held metering systems
Microcontroller Applications
The main applications of microcontrollers types include the following.
• Automobiles
• Hand-held metering systems
• Mobile Phones
• Computer Systems
• Security Alarms
• Appliances
• Current meter
• Cameras
• Micro Oven
• Measurement Instruments
• Devices for process control
• Used in metering & measurement devices, voltmeter, measuring
rotating objects
Microcontroller Applications
• Controlling Devices
• Industrial instrumentation devices
• Instrumentation devices in Industries
• Light Sensing
• Safety devices
• Process control devices
• Controlling devices
• Fire detection
• Temperature sensing
• Mobile Phones
• Auto Mobiles
• Washing Machines
• Cameras
• Security Alarms

More Related Content

Similar to Unit 4.pptx

8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller nitugatkal
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerSudhanshu Janwadkar
 
UNIT 4 8051Microcontroller.pptx
UNIT 4 8051Microcontroller.pptxUNIT 4 8051Microcontroller.pptx
UNIT 4 8051Microcontroller.pptxGowrishankar C
 
8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptxARYAKUMARNIRAV
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 MicrocontrollerJai Sudhan
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Ganesh Ram
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessorIama Marsian
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxShanDimantha1
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller918007165995
 
MPI-uses and their applications in day to day life
MPI-uses and their applications in day to day lifeMPI-uses and their applications in day to day life
MPI-uses and their applications in day to day lifessuser2b759d
 

Similar to Unit 4.pptx (20)

8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
Ch3 ppt
Ch3 pptCh3 ppt
Ch3 ppt
 
12 mt06ped001
12 mt06ped001 12 mt06ped001
12 mt06ped001
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 Microcontroller
 
UNIT 4 8051Microcontroller.pptx
UNIT 4 8051Microcontroller.pptxUNIT 4 8051Microcontroller.pptx
UNIT 4 8051Microcontroller.pptx
 
8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
MCUnit 4and 5_New.pptx
MCUnit 4and 5_New.pptxMCUnit 4and 5_New.pptx
MCUnit 4and 5_New.pptx
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))
 
Mp 8085
Mp 8085Mp 8085
Mp 8085
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptx
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
 
MPI-uses and their applications in day to day life
MPI-uses and their applications in day to day lifeMPI-uses and their applications in day to day life
MPI-uses and their applications in day to day life
 
UNIT 3 mp (1).ppt
UNIT 3 mp (1).pptUNIT 3 mp (1).ppt
UNIT 3 mp (1).ppt
 

More from BLACKSPAROW

DICTIONARY USING.pptx
DICTIONARY USING.pptxDICTIONARY USING.pptx
DICTIONARY USING.pptxBLACKSPAROW
 
Soft skills and it’s Importance (1).pptx
Soft skills and it’s Importance (1).pptxSoft skills and it’s Importance (1).pptx
Soft skills and it’s Importance (1).pptxBLACKSPAROW
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptxBLACKSPAROW
 
UnitOnePresentationSlides.pptx
UnitOnePresentationSlides.pptxUnitOnePresentationSlides.pptx
UnitOnePresentationSlides.pptxBLACKSPAROW
 
digital signature algo.pptx
digital signature algo.pptxdigital signature algo.pptx
digital signature algo.pptxBLACKSPAROW
 

More from BLACKSPAROW (13)

DICTIONARY USING.pptx
DICTIONARY USING.pptxDICTIONARY USING.pptx
DICTIONARY USING.pptx
 
ix d.pptx
ix d.pptxix d.pptx
ix d.pptx
 
Soft skills and it’s Importance (1).pptx
Soft skills and it’s Importance (1).pptxSoft skills and it’s Importance (1).pptx
Soft skills and it’s Importance (1).pptx
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptx
 
80386-1.pptx
80386-1.pptx80386-1.pptx
80386-1.pptx
 
UnitOnePresentationSlides.pptx
UnitOnePresentationSlides.pptxUnitOnePresentationSlides.pptx
UnitOnePresentationSlides.pptx
 
24.pptx
24.pptx24.pptx
24.pptx
 
1791.pptx
1791.pptx1791.pptx
1791.pptx
 
UNIT 3.pptx
UNIT 3.pptxUNIT 3.pptx
UNIT 3.pptx
 
UNIT 2.pptx
UNIT 2.pptxUNIT 2.pptx
UNIT 2.pptx
 
Unit four .pptx
Unit four .pptxUnit four .pptx
Unit four .pptx
 
ECC_basics.ppt
ECC_basics.pptECC_basics.ppt
ECC_basics.ppt
 
digital signature algo.pptx
digital signature algo.pptxdigital signature algo.pptx
digital signature algo.pptx
 

Recently uploaded

(NEHA) Bhosari Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(NEHA) Bhosari Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(NEHA) Bhosari Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(NEHA) Bhosari Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Call Girl Benson Town - Phone No 7001305949 For Ultimate Sexual Urges
Call Girl Benson Town - Phone No 7001305949 For Ultimate Sexual UrgesCall Girl Benson Town - Phone No 7001305949 For Ultimate Sexual Urges
Call Girl Benson Town - Phone No 7001305949 For Ultimate Sexual Urgesnarwatsonia7
 
history of 1935 philippine constitution.pptx
history of 1935 philippine constitution.pptxhistory of 1935 philippine constitution.pptx
history of 1935 philippine constitution.pptxhellokittymaearciaga
 
Greater Noida Call Girls 9711199012 WhatsApp No 24x7 Vip Escorts in Greater N...
Greater Noida Call Girls 9711199012 WhatsApp No 24x7 Vip Escorts in Greater N...Greater Noida Call Girls 9711199012 WhatsApp No 24x7 Vip Escorts in Greater N...
Greater Noida Call Girls 9711199012 WhatsApp No 24x7 Vip Escorts in Greater N...ankitnayak356677
 
Call Girls Service AECS Layout Just Call 7001305949 Enjoy College Girls Service
Call Girls Service AECS Layout Just Call 7001305949 Enjoy College Girls ServiceCall Girls Service AECS Layout Just Call 7001305949 Enjoy College Girls Service
Call Girls Service AECS Layout Just Call 7001305949 Enjoy College Girls Servicenarwatsonia7
 
No.1 Call Girls in Basavanagudi ! 7001305949 ₹2999 Only and Free Hotel Delive...
No.1 Call Girls in Basavanagudi ! 7001305949 ₹2999 Only and Free Hotel Delive...No.1 Call Girls in Basavanagudi ! 7001305949 ₹2999 Only and Free Hotel Delive...
No.1 Call Girls in Basavanagudi ! 7001305949 ₹2999 Only and Free Hotel Delive...narwatsonia7
 
Panet vs.Plastics - Earth Day 2024 - 22 APRIL
Panet vs.Plastics - Earth Day 2024 - 22 APRILPanet vs.Plastics - Earth Day 2024 - 22 APRIL
Panet vs.Plastics - Earth Day 2024 - 22 APRILChristina Parmionova
 
WORLD CREATIVITY AND INNOVATION DAY 2024.
WORLD CREATIVITY AND INNOVATION DAY 2024.WORLD CREATIVITY AND INNOVATION DAY 2024.
WORLD CREATIVITY AND INNOVATION DAY 2024.Christina Parmionova
 
Club of Rome: Eco-nomics for an Ecological Civilization
Club of Rome: Eco-nomics for an Ecological CivilizationClub of Rome: Eco-nomics for an Ecological Civilization
Club of Rome: Eco-nomics for an Ecological CivilizationEnergy for One World
 
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...Suhani Kapoor
 
Action Toolkit - Earth Day 2024 - April 22nd.
Action Toolkit - Earth Day 2024 - April 22nd.Action Toolkit - Earth Day 2024 - April 22nd.
Action Toolkit - Earth Day 2024 - April 22nd.Christina Parmionova
 
(SUHANI) Call Girls Pimple Saudagar ( 7001035870 ) HI-Fi Pune Escorts Service
(SUHANI) Call Girls Pimple Saudagar ( 7001035870 ) HI-Fi Pune Escorts Service(SUHANI) Call Girls Pimple Saudagar ( 7001035870 ) HI-Fi Pune Escorts Service
(SUHANI) Call Girls Pimple Saudagar ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
EDUROOT SME_ Performance upto March-2024.pptx
EDUROOT SME_ Performance upto March-2024.pptxEDUROOT SME_ Performance upto March-2024.pptx
EDUROOT SME_ Performance upto March-2024.pptxaaryamanorathofficia
 
##9711199012 Call Girls Delhi Rs-5000 UpTo 10 K Hauz Khas Whats Up Number
##9711199012 Call Girls Delhi Rs-5000 UpTo 10 K Hauz Khas  Whats Up Number##9711199012 Call Girls Delhi Rs-5000 UpTo 10 K Hauz Khas  Whats Up Number
##9711199012 Call Girls Delhi Rs-5000 UpTo 10 K Hauz Khas Whats Up NumberMs Riya
 
(多少钱)Dal毕业证国外本科学位证
(多少钱)Dal毕业证国外本科学位证(多少钱)Dal毕业证国外本科学位证
(多少钱)Dal毕业证国外本科学位证mbetknu
 
Goa Escorts WhatsApp Number South Goa Call Girl … 8588052666…
Goa Escorts WhatsApp Number South Goa Call Girl … 8588052666…Goa Escorts WhatsApp Number South Goa Call Girl … 8588052666…
Goa Escorts WhatsApp Number South Goa Call Girl … 8588052666…nishakur201
 
Artificial Intelligence in Philippine Local Governance: Challenges and Opport...
Artificial Intelligence in Philippine Local Governance: Challenges and Opport...Artificial Intelligence in Philippine Local Governance: Challenges and Opport...
Artificial Intelligence in Philippine Local Governance: Challenges and Opport...CedZabala
 
Precarious profits? Why firms use insecure contracts, and what would change t...
Precarious profits? Why firms use insecure contracts, and what would change t...Precarious profits? Why firms use insecure contracts, and what would change t...
Precarious profits? Why firms use insecure contracts, and what would change t...ResolutionFoundation
 
2024: The FAR, Federal Acquisition Regulations - Part 28
2024: The FAR, Federal Acquisition Regulations - Part 282024: The FAR, Federal Acquisition Regulations - Part 28
2024: The FAR, Federal Acquisition Regulations - Part 28JSchaus & Associates
 

Recently uploaded (20)

(NEHA) Bhosari Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(NEHA) Bhosari Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(NEHA) Bhosari Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(NEHA) Bhosari Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Call Girl Benson Town - Phone No 7001305949 For Ultimate Sexual Urges
Call Girl Benson Town - Phone No 7001305949 For Ultimate Sexual UrgesCall Girl Benson Town - Phone No 7001305949 For Ultimate Sexual Urges
Call Girl Benson Town - Phone No 7001305949 For Ultimate Sexual Urges
 
history of 1935 philippine constitution.pptx
history of 1935 philippine constitution.pptxhistory of 1935 philippine constitution.pptx
history of 1935 philippine constitution.pptx
 
Greater Noida Call Girls 9711199012 WhatsApp No 24x7 Vip Escorts in Greater N...
Greater Noida Call Girls 9711199012 WhatsApp No 24x7 Vip Escorts in Greater N...Greater Noida Call Girls 9711199012 WhatsApp No 24x7 Vip Escorts in Greater N...
Greater Noida Call Girls 9711199012 WhatsApp No 24x7 Vip Escorts in Greater N...
 
Call Girls Service AECS Layout Just Call 7001305949 Enjoy College Girls Service
Call Girls Service AECS Layout Just Call 7001305949 Enjoy College Girls ServiceCall Girls Service AECS Layout Just Call 7001305949 Enjoy College Girls Service
Call Girls Service AECS Layout Just Call 7001305949 Enjoy College Girls Service
 
No.1 Call Girls in Basavanagudi ! 7001305949 ₹2999 Only and Free Hotel Delive...
No.1 Call Girls in Basavanagudi ! 7001305949 ₹2999 Only and Free Hotel Delive...No.1 Call Girls in Basavanagudi ! 7001305949 ₹2999 Only and Free Hotel Delive...
No.1 Call Girls in Basavanagudi ! 7001305949 ₹2999 Only and Free Hotel Delive...
 
Panet vs.Plastics - Earth Day 2024 - 22 APRIL
Panet vs.Plastics - Earth Day 2024 - 22 APRILPanet vs.Plastics - Earth Day 2024 - 22 APRIL
Panet vs.Plastics - Earth Day 2024 - 22 APRIL
 
WORLD CREATIVITY AND INNOVATION DAY 2024.
WORLD CREATIVITY AND INNOVATION DAY 2024.WORLD CREATIVITY AND INNOVATION DAY 2024.
WORLD CREATIVITY AND INNOVATION DAY 2024.
 
Club of Rome: Eco-nomics for an Ecological Civilization
Club of Rome: Eco-nomics for an Ecological CivilizationClub of Rome: Eco-nomics for an Ecological Civilization
Club of Rome: Eco-nomics for an Ecological Civilization
 
Call Girls Service Connaught Place @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Connaught Place @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Connaught Place @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Connaught Place @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
 
Action Toolkit - Earth Day 2024 - April 22nd.
Action Toolkit - Earth Day 2024 - April 22nd.Action Toolkit - Earth Day 2024 - April 22nd.
Action Toolkit - Earth Day 2024 - April 22nd.
 
(SUHANI) Call Girls Pimple Saudagar ( 7001035870 ) HI-Fi Pune Escorts Service
(SUHANI) Call Girls Pimple Saudagar ( 7001035870 ) HI-Fi Pune Escorts Service(SUHANI) Call Girls Pimple Saudagar ( 7001035870 ) HI-Fi Pune Escorts Service
(SUHANI) Call Girls Pimple Saudagar ( 7001035870 ) HI-Fi Pune Escorts Service
 
EDUROOT SME_ Performance upto March-2024.pptx
EDUROOT SME_ Performance upto March-2024.pptxEDUROOT SME_ Performance upto March-2024.pptx
EDUROOT SME_ Performance upto March-2024.pptx
 
##9711199012 Call Girls Delhi Rs-5000 UpTo 10 K Hauz Khas Whats Up Number
##9711199012 Call Girls Delhi Rs-5000 UpTo 10 K Hauz Khas  Whats Up Number##9711199012 Call Girls Delhi Rs-5000 UpTo 10 K Hauz Khas  Whats Up Number
##9711199012 Call Girls Delhi Rs-5000 UpTo 10 K Hauz Khas Whats Up Number
 
(多少钱)Dal毕业证国外本科学位证
(多少钱)Dal毕业证国外本科学位证(多少钱)Dal毕业证国外本科学位证
(多少钱)Dal毕业证国外本科学位证
 
Goa Escorts WhatsApp Number South Goa Call Girl … 8588052666…
Goa Escorts WhatsApp Number South Goa Call Girl … 8588052666…Goa Escorts WhatsApp Number South Goa Call Girl … 8588052666…
Goa Escorts WhatsApp Number South Goa Call Girl … 8588052666…
 
Artificial Intelligence in Philippine Local Governance: Challenges and Opport...
Artificial Intelligence in Philippine Local Governance: Challenges and Opport...Artificial Intelligence in Philippine Local Governance: Challenges and Opport...
Artificial Intelligence in Philippine Local Governance: Challenges and Opport...
 
Precarious profits? Why firms use insecure contracts, and what would change t...
Precarious profits? Why firms use insecure contracts, and what would change t...Precarious profits? Why firms use insecure contracts, and what would change t...
Precarious profits? Why firms use insecure contracts, and what would change t...
 
2024: The FAR, Federal Acquisition Regulations - Part 28
2024: The FAR, Federal Acquisition Regulations - Part 282024: The FAR, Federal Acquisition Regulations - Part 28
2024: The FAR, Federal Acquisition Regulations - Part 28
 

Unit 4.pptx

  • 1. Unit 4 Introduction to Microcontrollers Presented By, Amruta Ingle Assistant Professor
  • 2. History • uC developed in 1971 by Intel in US. • 1st 4-bit uC- i4004 –used for calculator. Intel 4004 – 1971 4040- 8008 8080 TMS1000 – TI 1974- 1st true uC- combined ROM, RAM, uP, clk onchip 8048 - Intel 1977 –uC with RAM+ROM-8 bit 8051- Intel 1981- uC with RAM+ROM+Timer+serial port- 8bit 8096- Intel 16-bit uC for High speed I/O applications Microprocessors, need several external peripherals to be connected, therefore system cost is high
  • 3. 8051 Microcontroller Architecture • Features of 8051: – 8051 microcontroller is designed by Intel in 1981 – Belong to MCS-51 family of Microcontrollers. – It is an 8-bit microcontroller. – Data Bus-8 Bits i.e can handle 8-bits of data at a time – Address Bus-16 Bits i.e. Can access 216 = 64KBytes of memory (ROM and External RAM) – It is built with 40 pins DIP (dual inline package) – 4kb of internal/ on-chip ROM – 128 bytes of internal/ on-chip RAM – Two 16-bit timers – four parallel 8-bit ports, which are programmable as well as addressable as per the requirement. – 1 UART for Serial Communication – On-chip crystal oscillator is integrated in the microcontroller having crystal frequency of 12 MHz.
  • 6. 8051 Pin Description Port Pins: Pins 1 to 8 − These pins are known as Port 1. Bi- directional I/O port. This port doesn’t serve any other functions. Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like interrupts, timer input, control signals, serial communication signals RxD and TxD, etc. Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order address bus signals are also multiplexed using this port. Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order address and data bus signals are multiplexed using this port.
  • 7. 8051 Pin Description Other Pins: • Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial values. • Pins 18 & 19 − These pins are used for interfacing an external crystal to get the system clock. • Pin 20 − This pin provides the power supply to the circuit. • Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a signal from the external program memory. • Pin 30 − This is EA pin which stands for External Access input. It is used to enable/disable the external memory interfacing. • Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to demultiplex the address-data signal of port. • Pin 40 − This pin is used to provide power supply to the circuit.
  • 8. Registers of 8051 Storage Registers in 8051 • Accumulator • R register • B register • Data Pointer (DPTR) • Program Counter (PC) • Stack Pointer (SP)
  • 9. Registers of 8051 Accumulator: • The accumulator, register A, is used for all arithmetic and logic operations. If the accumulator is not present, then every result of each calculation (addition, multiplication, shift, etc.) is to be stored into the main memory. Access to main memory is slower than access to a register like the accumulator "R" Registers: • The "R" registers are a set of eight registers, namely, R0, R1 to R7. These registers function as auxiliary or temporary storage registers in many operations "B" Register • The "B" register is very similar to the Accumulator in the sense that it may hold an 8-bit (1-byte) value. The "B" register is used only by two 8051 instructions: MUL AB and DIV AB.
  • 10. Registers of 8051 Data Pointer • The Data Pointer (DPTR) is the 8051’s only user-accessible 16- bit (2-byte) register. The Accumulator, R0–R7 registers and B register are 1-byte value registers. DPTR is meant for pointing to data. It is used by the 8051 to access external memory using the address indicated by DPTR. DPTR is the only 16-bit register available and is often used to store 2-byte values. Program Counter • The Program Counter (PC) is a 2-byte address which tells the 8051 where the next instruction to execute can be found in the memory. PC starts at 0000h when the 8051 initializes and is incremented every time after an instruction is executed.
  • 11. Registers of 8051 Stack Pointer (SP) • The Stack Pointer, like all registers except DPTR and PC, may hold an 8-bit (1-byte) value. The Stack Pointer tells the location from where the next value is to be removed from the stack. When a value is pushed onto the stack, the value of SP is incremented and then the value is stored at the resulting memory location. When a value is popped off the stack, the value is returned from the memory location indicated by SP, and then the value of SP is decremented. • This order of operation is important. • SP will be initialized to 07h when the 8051 is initialized.
  • 12. Registers of 8051 8051 Flag Bits and PSW Register • The program status word (PSW) register is an 8-bit register, also known as flag register. It is of 8-bit wide but only 6-bit of it is used. • Four of the flags are called conditional flags, which means that they indicate a condition which results after an instruction is executed. These four are CY (Carry), AC (auxiliary carry), P (parity), and OV (overflow). • The bits RS0 and RS1 are used to change the bank registers. The following figure shows the program status word register.
  • 13. Registers of 8051 • PSW • CY, the carry flag − This carry flag is set (1) whenever there is a carry out from the D7 bit. It is affected after an 8-bit addition or subtraction operation. • AC, auxiliary carry flag − If there is a carry from D3 and D4 during an ADD or SUB operation, the AC bit is set; otherwise, it is cleared. • P, the parity flag − The parity flag represents the number of 1's in the accumulator register only. If the A register contains odd number of 1's, then P = 1; and for even number of 1's, P = 0. • OV, the overflow flag − This flag is set whenever the result of a signed number operation is too large causing the high-order bit to overflow into the sign bit. Also used to check Timer overflow.
  • 14. ROM Space in 8051 • The Program Memory or ROM is a type of non-volatile memory used in microcontrollers where the code or the program to be executed is stored using the program counter (PC), like tables or initialization program. Intel 8051 has an internal/ built-in ROM of 4KB and can be extended up to 64KB by using an external program memory. • External Program Memory • Internal Program Memory (4KB) i.e. from 0000H to 0FFFH + External Program Memory (60KB) i.e. from 1000H to FFFFH. This mode is selected by making EA = 1. (Refer to fig.1) • Total External Program Memory (64KB) i.e., over the entire range of 0000H to FFFFH. This mode is selected by making EA = 0. (Refer to fig.2)
  • 15. RAM in 8051 • The 128 bytes of RAM inside the 8051 are assigned the address 00 to 7FH. They can be accessed directly as memory locations and are divided into three different groups as follows − – 32 bytes from 00H to 1FH locations are set aside for register banks and the stack. – 16 bytes from 20H to 2FH locations are set aside for bit-addressable read/write memory. – 80 bytes from 30H to 7FH locations are used for read and write storage; it is called as scratch pad. These 80 locations RAM are widely used for the purpose of storing data and parameters by 8051 programmers.
  • 18. RAM in 8051 Register Banks in 8051 • A total of 32 bytes of RAM are set aside for the register banks and the stack. • These 32 bytes are divided into four register banks in which each bank has 8 registers, R0–R7. • RAM locations from 0 to 7 are set aside for bank 0. • The second bank of registers R0–R7 starts at RAM location 08 and goes to locations OFH. • The third bank of R0–R7 starts at memory location 10H and goes to location to 17H. • Finally, RAM locations 18H to 1FH are set aside for the fourth bank of R0–R7.
  • 20. 8096 Microcontroller Architecture 1.The 8096 is a 16-bit microcontroller. 2.The 8096 is designed to use in applications which require high speed calculations and fast I/O operations. 3.The high speed I/O section of an 8096 includes a 16 bit timer, a 16 bit counter, a 4 input programmable edge detector; 4. software timers, and a 6-output programmable event generator. 5. CPU with 232 byte register file and register ALU 6. 8-Kbyte internal ROM 7. 256 bytes internal RAM • 8. Two 16-bit Timers/Counters • 9. A Serial port • 10. Pulse width modulator • 11. Watchdog timer • 12. Eight multiplexed inputs analog to digital converter with 10 bit resolution and • 13. Memory controller • 14. It has 100 instructions, which can operate on bit, byte, word, double words. • It consists of a complete set of 16-bit arithmetic instructions including multiply and divide operations. • Logical and arithmetic instructions are available for both byte and word operations.
  • 21. 8096 Microcontroller Architecture • 8096 Microprocessor Functional Units
  • 22. 8096 Microcontroller Architecture • Two main buses (A-bus and D-bus) are used for inter- processor communication. A-bus is a 8-bit address bus and D-bus is a 16-bit data bus. The D-bus transfers data only between the RALU and the register file or special function registers (SFRs). • The A-bus provides the addresses for above transfers or address for multiplexed address/data bus connecting to the memory controller. The memory controller provides the addresses for the internal ROM and external memory.
  • 23.
  • 24. 8096 Microcontroller Architecture • RALU: • Instructions to the RALU are taken from the A-Bus and stored temporarily in the instruction register. The Control Unit decodes the instructions and generates the correct sequence of signals to have the RALU perform the desired function. • It contains a 17-bit ALU, the program status word (PSW), It contains a 17-bit ALU, the Program Status Word (PSW), the Program Counter (PC), a loop counter, and three temporary registers. All of the registers are 16-bits or 17-bits (16 + sign extension) wide. Some of the registers have the ability to perform simple operations to off-load the ALU.
  • 25. 8096 Microcontroller Architecture • 8096 Memory Space: • The addressable memory space on the 8096 Memory Space consists of 64 K bytes, most of which is available to the user for program or data memory. • Locations which have special purposes are 0000H through 00FFH and 1FFEH through 2080H. • All other locations can be used for either program or data storage or for memory mapped peripherals.
  • 26.
  • 27. Microcontroller Applications • Microcontrollers are intended for embedded devices, in comparison to the micro-processors which are used in PCs or other all-purpose devices. • Microcontrollers are employed in automatically managed inventions and appliances like- power tools, implantable medical devices, automobile engine control systems, , office machines, remote controls appliances, toys and many more embedded systems. • By dipping the size and expenditure in comparison to a design that make use of a different micro-processor, I/O devices and memory, micro-controllers formulate it inexpensive to digitally control more & more appliances and operations. • Mixed signal micro-controllers are general; putting together analog constituents required controlling non-digital electronic structures.
  • 28. Microcontroller Applications Application of Microcontroller in Day to Day Life Devices: • Light sensing & controlling devices • Temperature sensing and controlling devices • Fire detection & safety devices • Application of Microcontroller in Industrial Control Devices: • Industrial instrumentation devices • Process control devices • Application of Microcontroller in Metering & Measurement Devices: • Volt Meter • Measuring revolving objects • Current meter • Hand-held metering systems
  • 29. Microcontroller Applications The main applications of microcontrollers types include the following. • Automobiles • Hand-held metering systems • Mobile Phones • Computer Systems • Security Alarms • Appliances • Current meter • Cameras • Micro Oven • Measurement Instruments • Devices for process control • Used in metering & measurement devices, voltmeter, measuring rotating objects
  • 30. Microcontroller Applications • Controlling Devices • Industrial instrumentation devices • Instrumentation devices in Industries • Light Sensing • Safety devices • Process control devices • Controlling devices • Fire detection • Temperature sensing • Mobile Phones • Auto Mobiles • Washing Machines • Cameras • Security Alarms