Architecture of the 8051 INTERNAL DATA BUS Oscillator & Timing Programmable I/O (32 Pins) 80C51 CPU 64K byte Expansion Control Serial I/O 4K Program Memory.

Slides:



Advertisements
Similar presentations
The 8051 MicroController In this module, we will be discussing the MCS-51 family of microcontroller, in particular the 8051, which is the generic IC representative.
Advertisements

Parul Polytechnic Institute
Autumn 2012C.-S. Shieh, EC, KUAS, Taiwan1 The 8051 Family Microcontroller Chin-Shiuh Shieh Department of Electronic Engineering.
Chapter Microcontroller Objectives  Understand the 8051 Architecture  Use SFR in C  Use I/O ports in C.
Programmable Interval Timer
Chapter 2 HARDWARE SUMMARY
8051 Core Specification.
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
The 8085 Microprocessor Architecture. Contents The 8085 and its Buses. The address and data bus ALU Flag Register Machine cycle Memory Interfacing The.
Processor System Architecture
CSC Timers Since this is a microcontroller it mainly finds itself in embedded devices Quite often embedded devices need to synchronize events The.
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
Micro-controller or embedded controller
Microcontroller 8051.
Embedded Systems UNIT 3. Pin Details of 8051 Pins 1-8: Port 1 Each of these pins can be configured as an input or an output. Pin 9: The positive voltage.
The 8051 Microcontroller and Embedded Systems
The 8051 Microcontroller architecture
Microcontroller 8051.
ECE/CS-352: Embedded Microcontroller Systems Embedded Microcontroller Systems.
Microcontroller Intel 8051 [Architecture]. The Microcontroller Microcontrollers can be considered as self-contained systems with a processor, memory and.
The 8253 Programmable Interval Timer
CoE3DJ4 Digital Systems Design Hardware summary. Microprocessors vs. Microcontrollers Microprocessors are single-chip CPU used in microcomputers Microcontrollers.
1. Registers Used in Timer/Counter  TH0, TL0, TH1, TL1  TMOD (Timer mode register)  TCON (Timer control register) 2.
8051 Micro controller. Architecture of 8051 Features of 8051.
MCS51 - part 2. Lecture 2 2/17 MCS51 functioning Clock generator Machine & instruction cycles Paralell ports Reset.
Microcontrollers Class : 4th Semister E&C and EEE Subject Code: 06ES42
Microcontrollers. An embedded microcontroller is a chip which a computer processor with all it’s support functions (clocking and reset), memory, and i/O.
Intel 8051 Another family of microcontroller is the Intel 8051 family. The basic 8051 microcontroller has four parallel input/output ports, port 0, 1,
Computer Architecture Lecture 6 by Engineer A. Lecturer Aymen Hasan AlAwady 1/12/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
The 8051 Microcontroller Prepared By, R-THANDAIAH PRABU M.E.,
CIT 673 Created by Suriyong1 Micro controller hardware architechture.
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Presented by Sadhish Prabhu
EE/CS-352: Embedded Microcontroller Systems Part V The 8051 Assembly Language Interrupts.
Lecture 3 CSE 341 – Microprocessors Lecture 3 Md. Omar Faruqe UB 1228
Chapter Microcontroller
8051 Micro Controller. Microcontroller versus general-purpose microprocessor.
The 8051 Microcontroller Chapter 6 INTERRUPTS. 2/29 Interrupt is the occurrence of a condition an event that causes a temporary suspension of a program.
Timer Programming in Assembly and C Prepared By:
HJD Institute of Technical Education & Research- Kera(Kutch) The 8051 Microcontroller architecture PREPARED BY: RAYMA SOHIL( )
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Embedded Microcontroller Systems
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
Embedded Microcontroller Systems
UNIT – Microcontroller.
8051 Timers Timers are the peripherals of the 8051 Microcontroller.
The 8085 Microprocessor Architecture
Hardware Source: ttp:// under
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
Interrupt Source: under
UNIT 5 TIMRERS/COUNTERS
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Data bus CPU General Purpose microprocessor RAM ROM I/O Port Timer
Microcontroller Intel 8051
Interfacing Memory Interfacing.
Interrupt.
Timer.
The 8051 Microcontroller (8 bit )
8051 Microcontroller.
Interrupt Source: under
Hardware Source: ttp:// under
Important 8051 Features On chip oscillator 4K bytes ROM 128 bytes RAM
UNIT-VIII 8051 Microcontroller Architecture Register set of 8051
Interrupt Source: under
The 8085 Microprocessor Architecture
8051 Micro Controller.
The 8051 Microcontroller (8 bit )
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
Presentation transcript:

Architecture of the 8051 INTERNAL DATA BUS Oscillator & Timing Programmable I/O (32 Pins) 80C51 CPU 64K byte Expansion Control Serial I/O 4K Program Memory 128 bytes RAM 2x16 bit Timers 5 x Interrupts

Oscillator circuit times the CPU: Typical 12 MHz. Note that one machine cycle is 6 states, which are 12 clocks. CPU: Has instruction decoder, ALU, PC and Boolean Processor, Instruction register and interrupt SFRs Interrupt Priority Register (IPR) and Interrupt Enable Register (IEC). 4K PROM: Expandable to 64K using DPTR/PC + MOVX instruction. 128 byte Scratchpad Addressable bits in the LSByte of SFRs. SFRs include registers A, B, PSW, SP, DPH/DPL 2x16 bit timers: These are controlled with SFRs TMOD and TCON. There is also an interrupt vector for each timer overflow. Expansion control is capable of supporting 64Kbyte of external ROM. 32 I/O pins, pin addressable (some are multiplexed) in 4 x 8 bit port usage. Serial I/O: Two SFRs (SCON, SBUF) are used to control the programmable serial port, which is a full/duplex UART.

Interfacing external ROM (8K), RAM and PPI

1. 8K is 2 13 so we need 13 address lines. 2. Memory is decoded with '0' active, so we use A13 '0' to CE/. This enables addresses (0000-1FFF) using address lines A0-A If A13 goes high addresses (2000-3FFF) become active for the RAM 6164 CS. This CS is active high and therefore only decoded for A13='1' 4. PPI is decoded with A13 active low. It is therefore mutually excluded from RAM but not so with ROM. 5. The PPI is internally decoded with A1,A2 for programming registers. Potentially there is a problem in that one could read from ROM and think that they are reading a PPI port. To solve this, PSEN/ is only active for External ROM access. It can therefore be used with A13 to disable the PPI, as shown above

Timing waveforms for the ROM interface: Note P0 is data/Address multiplexed

ALE: Edge triggered Address Latch Enable. This supports the data address multiplexing. It is used to latch the low PCL address value. ALE Latches addresses A0-A7 from port P0 on the -ve edge. Note that high byte is available directly. PSEN/: Edge triggered: Progam store enable is a signal that only goes active low during external read cycle. PSEN + ALE control the contents of P0. Address values are needed for external memory access and so PSEN/ needs to combine with ALE. During the DOWN edge of ALE address low is latched and PCL is on the bus going into ROM. During the next state address is decoded and the next state reads the value at the decoded address. In the first read it is the instruction. Subsequent reads are again PCL followed by DATA.

POLLING: User controlled, input is strobed by the program at pre-determined intervals. This is useful in slow response systems and convenient because formal proofs are possible and this is especially relevant in time critical systems where formal methods can be used to verify the program. INTERRUPTS: Program control relinquished to ISR by MAIN upon signal of INT. Usually vectored, => ISR location is directly available from the INT signal. Execution and response is never better than 50uS in 8051 family therefore some real time applications can not be supported. Good for pre-empting and multitasking work however it is virtually impossible to use formal proofs since the point of interrupts can not be predicted. Interrupts are also prioritised to enable a hierarchical control structure.

1.5 interrupt sources, each can be individually enabled/disabled. 2.Each can be globally enabled/disabled 3.Each is vectored to an individual address: Vectoring locates the ISR 4.Each can be assigned one of two interrupt levels 5.Nesting is possible to two levels 6.External interrupts can be level or edge triggered.

8051 Interrupt structure

Example of a timing routine producing 1ms Pulse: #include void main(void) ( TMOD=0x01; /* 16-bit timer counter*/ TH0=~(1000/256); /* quotient*/ TL0=-(1000%256); /* remainder*/ TR0=1;/* timer on*/ } Counting up to 1000d at 12 Mhz (FFFFh-999d)= FC18h Counting up from FC18 to FFFF will be 999d. A further count up will reset counter to 000 which can be used to signal an interrupt to produce a real time clock. An interrupt occurs every 1 ms in order to allow processor to do other taks ie multitasking. We need to set up the interrupt SFR to signal am interrupt when the counter resets. Intrerrupt 1 is the timer 0 vector at 0Bh Interrupt || Bh The ISRs have to be located at these vectors

Tutorial exercises: Q 1. Draw a block diagram of the 8051 micro-controller architecture and explain briefly each component. In your answer, also explain the function of each Special Function Register. Q 2. Draw a diagram showing how an 8031, ROM-less chip can be interfaced to a memory expansion comprising a 16K EPROM and an 8K RAM and also an 8255 Programmable peripheral interface. Also draw the relevant timing waveforms and explain in detail how the full expansion functions. Q 3. Discuss and contrast the concepts of polling and interrupts in program control for embedded systems. Q4. Explain in detail the full interrupt structure of the 8051 micro- controller. Q5. Draw a flow chart and write in C or assembly, a program to provide a real-time clock function by using the timer overflow to signal an interrupt. (Note: It is not necessary to calculate the frequency of the interrupt)