Documente Academic
Documente Profesional
Documente Cultură
mC
It consists of a processor and other ckts like memory, I/O ports, Timers etc. in single chip. Speed of operation is higher Space and size requirements are very less. The number of instructions available is less Less flexibility. Cost effective.
TYPES OF mC
General purpose mC :- They are design to used for general purpose applications. Embedded mC :- They are design to used only for specific applications.
Embedded System
Embedded system means the processor is embedded into that application. An embedded product uses a microprocessor or microcontroller to do one task only. In an embedded system, there is only one application software that is typically burned into ROM. Exampleprinter, keyboard, video game player, mobile phones, Electronic toys etc.
On chip ROM
2 3 2 3 2 3
5 6 5 6 5 6
1 1 1 1 1 1
INTEL 8051 mC
Features: It is an 8-bit mC.
It is available in a 40 pin I.C. designed using CMOS or HMOS technology. It is based Harvard architecture model. It has 8 bit data bus and 16 bit address bus. It has 128 bytes on chip RAM (data memory). It has 4KB of on chip ROM (program memory). It has 32 I/O pins which are configured as four 8-bit I/O ports (P0,P1,P2,P3) It can access external data/program memory of maximum of 64 Kbytes. The range of operating frequency available is 1MHz 16 MHz. The most commonly used clock frequency is 11.0592 MHz.
On-chip RAM
Timer 1 Timer 0
Counter Inputs
CPU
Serial Port
OSC
Bus Control
4 I/O Ports
P0 P1 P2 P3
TxD RxD
Address/Data
STRUCTURE OF RAM
The 128 bytes RAM are divided into three different memory sections 1. Working registers 2. Bit addressable registers 3. General purpose registers
Working registers:- The first 32 locations of the RAM i.e. from 00H to 1FH are called working registers. The registers in these groups are divided into four(4) data banks Bank0(00-07),bank1(08-0F),Bank2(10-17) and bank3(18-1F).Each bank consists of 8-registers which are denoted as R0,R1,.R7. Only one memory bank is active at a time and the selection of a particular memory bank is done by programming the PSW register. Bit addressable registers:- The next 16 locations from 20H - 2FH are called bit addressable registers. Each bit of a register in these group are separately programmable. Therefore there are 128 bits which user can access. General purpose registers:- The remaining of the 128 locations i.e. from 30H 7FH are called general purpose registers. These registers are used for storing data or address.
REGISTER A AND B
Register A :- It is an 8 bit register which is used for arithmetical and logical operations.it holds the result after an operation. It is also called an Accumulator. Register B :- it is also an 8-bit register which is available as a general purpose register when not used in multiplication\division operations.
Cy
AC
Fo
RS1 RSo OV
P= shows parity of register A 1:-> odd parity; 0 :-> even parity OV = overflow flag AC = Auxillary Carry flag CY = Carry flag F0 = User flag 0. RS1 ,RS2 = register bank selection bits RS1 0 0 1 1 RS0 0 1 0 1 REGISTE R ABNK BANK 0 BANK 1 BANK 2 BANK 3
DPTR(DATA POINTER REGISTER) : It is a 16 bit register which is used as a memory pointer when accessing external data/memory I.C. since it is of 16 bit it can access up to a maximum locations of 64 KB .It can also be used as a separate two 8-bit register denoted as DPH and DPL. It is a part of SFR.
STACK POINTER (S.P) :- It is an 8 bit register which holds the address of the current TOP OF STACK. The stack refers to an area in the internal RAM. It is increased before a data is PUSH on to stack and It is decremented after a data is POP. PROGRAM COUNTER (P.C.) :- It is a 16-bit register which holds the address of memory location from which the next instruction is to be fetched.
TIMER\COUNTER REGISTERS
The Timer register is a part of SFR . There are two 16 bit timer registers denoted as To and T1. These registers can be separately access as ToL,ToH and T1L,T1H. There are different modes of operation of Timer/counter. The selection of the mode is controlled by another set of registers in the SFR called TMOD(Timer mode) and TCON(Timer control)
CONTROL REGISTERS
There are six(6) control registers provided for the operation like interrupt control and power control operations.These registers are apart of SFR.These registers are denoted as:I.E. Interrupt control I.P. Interrupt priority PCON power control SCON serial control SBUF Serial Data Buffer Po-3 I/O ports
8051 (8031)
EA - external access The EA pin is connected to GND to indicate the code is stored externally. /PSEN ALE are used for external ROM. For 8051, /EA pin is connected to Vcc. PSEN - program store enable This is an output pin and is connected to the OE pin of the ROM.