UNIT 4 Controllers PDF
UNIT 4 Controllers PDF
UNIT 4 Controllers PDF
•CPU , RAM, ROM, I/O and timers are all on a •CPU is stand-alone, RAM, ROM, I/O, timer
single chip are separate
RD
WR
ALE
© Oxford University Press 2015. All rights ALE - Address latch enable
reserved.
Direct Memory Access
RD
WR
ALE
Machines Cycle Status
• interpret (decode)
Mnemonic- ADD B
Mnemonic- MOV B, A
Opcode- ADD
Opcode- MOV
Operand- B
Operand- B, A
Hex Code- 80H
Hex Code- 47H
Binary code- 1000 0000
Binary code- 0100 0111
Instruction Format
Two-byte instructions –
Two-byte instruction is the type of instruction in
which the first 8 bits indicates the opcode and
the next 8 bits indicates the operand.
Mnemonic- MVI A, 32H Mnemonic- MVI B, F2H
Opcode- MVI Opcode- MVI
Operand- A, 32H Operand- B, F2H
Hex Code- 3E Hex Code- 06
32 F2
Binary code- 0011 1110 Binary code- 0000 0110
0011 0010 1111 0010
Three-byte instructions –
Group of
instruction
separate from
main program.
Avoids
repetition of
instruction in
the main
program and
thus saves
time.
(Register
In 8051-based system, the crystal oscillator has a frequency of 11.0592 MHz. Each machine
cycle is made up of 12 clock cycles. Hence for a single machine cycle, the frequency becomes
1/12 × 11.0529 MHz = 921.6 KHz.
8051 PIN Diagram
TxD/
[𝑃𝑆𝐸𝑁]= 0, then
external program
memory becomes
enabled and micro
controller read
content of external
memory location.
PLC – use µC or µ P
AND Function:
LD or LDI indicates to
the PLC that a new
rung is starting
© Oxford University Press 2015. All rights
reserved.
OR Function