8051
microcontroller / AT89C51 / 89C51 is 8-bit microcontroller which have 40 pins.
The meaning of 8-bit is, it can process on 8-bit data only. It consists of 8 data bus D0-D7 and 8-bit
accumulator. There are registers (memory elements) which are known as general
purpose registers and special function registers. there are 16-bit registers
also like data pointer (DPTR) and program counter (PC). As it is 8-bit
microcontroller, 16 bit registers can be accessed as two 8-bit registers like
DPH and DPL. As far as memory concern, it consists of 4k of ROM to store
programs and 128 bytes of RAM to store user data. For input and output
operations there are 4 parallel input-output ports namely port 0, port 1, port
2, port 3. each port is 8-bit wide and can be used as input by writing FFh
(1111 1111)B and as output port by
writing 00h (0000 000)B onto it.
Instruction: Instruction is the command given to the
microcontroller to perform specific task. Instruction is made up of two parts,
operational code and operand. 8051 supports 5 instruction sets
1)
Data
transfer instruction set
2)
Arithmetic
instruction set
3)
Logical instruction
set
4)
Boolean
variable bit manipulation instruction set
5)
Program
branching instruction set
Addressing modes: Addressing mode is the way in which
operands are used by instruction. 8051 supports 5 addressing modes.
1)
Register
addressing mode
2)
Direct addressing
mode
3)
Indirect addressing
mode
4)
Immediate
addressing mode
5)
Base plus
index register indirect addressing mode
Interrupt: interrupt is the incoming signal for
microcontroller which indicates that an event has been occurred. 8051 supports
6 vectored interrupts
1)
RST- 00H
2)
INT0-03H
3)
T0-0BH
4)
INT1-13H
5)
T1-1BH
6)
TI/RI-23H
There
are some special function registers listed below
1)
Program
status word (PSW)
2)
Interrupt
Enable (IE)
3)
Interrupt
Priority (IP)
4)
Timer
control (TCON)
5)
Timer
mode (TMOD)
6)
Power
control (PCON)
7)
Serial
control (SCON)
8)
Serial
buffer (SBUF)
Internal memory architecture of 8051 is
mainly divided into 3 parts
1)
Working
registers (consists of register banks RB0-RB3)
2)
Bit
addressable area
3)
General
purpose registers
Working registers: memory locations covered by working
registers are 00H-1FH. it consists of four register banks RB0 to RB3. each
register bank consists of 8 registers R0-R7. Each register of register bank is
8-bit wide.
Bit addressable area: memory locations covered by bit
addressable area ranges from 20H – 2FH. It consists bit addressable area which
is accessed by bit manipulation instructions.
General purpose registers: Memory locations from 30H-7FH are
occupied by General purpose registers. during programming, mostly in direct
addressing mode, it is preferred to use memory locations beyond 30H.
No comments:
Post a Comment