3. 33
FEATURESFEATURES
8-bit CPU optimized for control applications
64K Program Memory address space
64K Data Memory address space
4K bytes of on-chip Program Memory
128 bytes of on-chip Data RAM
32 bidirectional and individually addressable 1/0 lines
Two 16-bit timer/counters
Full duplex UART
6-source/5-vector interrupt structure with two priority levels
On-chip clock oscillator
11. 1111SKB'sSKB's
128 BYTE RAM128 BYTE RAM
128 BYTE
INTERNAL RAM
Register Banks
Reg Bank 0
Reg Bank 1
Reg Bank 2
Reg Bank 3
BIT Addressable
Area
General Purpose
Area
12. 1212SKB'sSKB's
REGISTER BANK STRUCTUREREGISTER BANK STRUCTURE
R0R0 R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 R7R7Bank 0
R0R0 R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 R7R7Bank 3
R0R0 R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 R7R7Bank 2
R0R0 R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 R7R7Bank 1
CYCY ACAC F0F0 RS1RS1 RS0RS0 OVOV -- PP
Program Status Word -Program Status Word - PSWPSW
20. 2020SKB'sSKB's
SERIAL PORT– Mode 0
The Serial Port in Mode-0 has the following
features:
• Serial data enters and exits through RXD
• TXD outputs the shifl clock
• 8 bits are transmitted / received
• The baud rate is fixed at (1/12) of the
oscillator frequency
21. 2121SKB'sSKB's
SERIAL PORT– Mode 1
The Serial Port in Mode-1 has the following features:
• Serial data enters RXD
• Serial data exits through TXD
• 10 bits are transmitted / received
Start bit (0)
Data bits (8)
Stop Bit (1)
• Baud rate is determined by the Timer 1 over
flow rate.
24. 2424SKB'sSKB's
INTERRUPTS
The Interrupt structure has the following features:
• 6 sources / 5 vectored interrupts
• Each interrupts can be individually programmable
• Each interrupts can have two priority levels
• Priority levels can be programmed
• All interrupts can be masked by a single bit - EA
• External interrupt type can be programmed
Edge triggered
Level Triggered
32. 3232SKB'sSKB's
Instruction SetInstruction Set
5 Groups5 Groups
Arithmetic Operation GroupArithmetic Operation Group
Logical Operation GroupLogical Operation Group
Data Transfer GroupData Transfer Group
Boolean Variable Manipulation GroupBoolean Variable Manipulation Group
Program Branching GroupProgram Branching Group
33. 3333SKB'sSKB's
Instruction SetInstruction Set
5 Groups5 Groups
Arithmetic Operation GroupArithmetic Operation Group
Logical Operation GroupLogical Operation Group
Data Transfer GroupData Transfer Group
Boolean Variable Manipulation GroupBoolean Variable Manipulation Group
Program Branching GroupProgram Branching Group
40. 4040SKB'sSKB's
Instruction SetInstruction Set
5 Groups5 Groups
Arithmetic Operation GroupArithmetic Operation Group
Logical Operation GroupLogical Operation Group
Data Transfer GroupData Transfer Group
Boolean Variable Manipulation GroupBoolean Variable Manipulation Group
Program Branching GroupProgram Branching Group
45. 4545SKB'sSKB's
Instruction SetInstruction Set
5 Groups5 Groups
Arithmetic Operation GroupArithmetic Operation Group
Logical Operation GroupLogical Operation Group
Data Transfer GroupData Transfer Group
Boolean Variable Manipulation GroupBoolean Variable Manipulation Group
Program Branching GroupProgram Branching Group
46. 4646SKB'sSKB's
Data Transfer GroupData Transfer Group
MOV A,DirectMOV A,Direct
MOV A,RnMOV A,Rn
MOV A,@RiMOV A,@Ri
MOV A,#DataMOV A,#Data
MOV Rn,DirectMOV Rn,Direct
MOV Rn,@RiMOV Rn,@Ri
MOV Rn,#DataMOV Rn,#Data
47. 4747SKB'sSKB's
Data Transfer GroupData Transfer Group
MOV Direct,DirectMOV Direct,Direct
MOV Direct,RnMOV Direct,Rn
MOV Direct,@RiMOV Direct,@Ri
MOV Direct,#DataMOV Direct,#Data
MOV Direct,AMOV Direct,A
MOV @Ri,AMOV @Ri,A
MOV @Ri,#DataMOV @Ri,#Data
48. 4848SKB'sSKB's
Data Transfer GroupData Transfer Group
MOV @Ri,DirectMOV @Ri,Direct
MOV DPTR,#DATA16MOV DPTR,#DATA16
MOVC A,@A+DPTRMOVC A,@A+DPTR
MOVC A,@A+PCMOVC A,@A+PC
MOVX A,@RiMOVX A,@Ri
MOVX @Ri,AMOVX @Ri,A
MOVX @DPTR,AMOVX @DPTR,A
49. 4949SKB'sSKB's
Data Transfer GroupData Transfer Group
PUSH DirectPUSH Direct
POPPOP DirectDirect
XCHXCH A,RnA,Rn
XCHXCH A,DirectA,Direct
XCHXCH A,@RiA,@Ri
XCHD A,@RiXCHD A,@Ri
50. 5050SKB'sSKB's
Instruction SetInstruction Set
5 Groups5 Groups
Arithmetic Operation GroupArithmetic Operation Group
Logical Operation GroupLogical Operation Group
Data Transfer GroupData Transfer Group
Boolean Variable Manipulation GroupBoolean Variable Manipulation Group
Program Branching GroupProgram Branching Group
54. 5454SKB'sSKB's
Instruction SetInstruction Set
5 Groups5 Groups
Arithmetic Operation GroupArithmetic Operation Group
Logical Operation GroupLogical Operation Group
Data Transfer GroupData Transfer Group
Boolean Variable Manipulation GroupBoolean Variable Manipulation Group
Program Branching GroupProgram Branching Group
55. 5555SKB'sSKB's
Program Branching GroupProgram Branching Group
ACALLACALL addr11addr11
LCALLLCALL addr16addr16
RETRET
RETIRETI
AJMPAJMP addr11addr11
LJMPLJMP addr16addr16
SJMPSJMP relrel
73. 7373SKB'sSKB's
1) Stepper Motor Control
2) Matrix Keyboard
3) Dynamic 7 Segment Display
4) Analog to Digital converter
5) DC Motor Control
6) LCD Display
7) Serial Data Transfer
74. STEPPER MOTOR CONTROLSTEPPER MOTOR CONTROL
Stepper MotorStepper Motor
Winding DiagramWinding Diagram
SpecificationsSpecifications
Rotation / Excitation methodsRotation / Excitation methods
Clockwise / Anti Clockwise SequenceClockwise / Anti Clockwise Sequence
Single & Multi Winding ExcitationSingle & Multi Winding Excitation
Driving unit Digital & AnalogDriving unit Digital & Analog
77. MATRIX KEYBOARDMATRIX KEYBOARD
General Keyboard StructureGeneral Keyboard Structure
Adv & Disadv of General KeyboardAdv & Disadv of General Keyboard
Layout of Matrix KeyboardLayout of Matrix Keyboard
Scanning and Sense LinesScanning and Sense Lines
Scan SequenceScan Sequence
Key De-bounce MethodsKey De-bounce Methods
92. 9292SKB'sSKB's
Pin number Symbol Level I/O Function
1 Vss - - Power supply (GND)
2 Vcc - - Power supply (+5V)
3 Vee - - Contrast adjust
4 RS 0/1 I
0 = Instruction input,
1 = Data input
5 R/W 0/1 I
0 = Write to LCD module,
1 = Read from LCD module
6 E 1, 1->0 I Enable signal
7 DB0 0/1 I/O Data bus line 0 (LSB)
8 DB1 0/1 I/O Data bus line 1
9 DB2 0/1 I/O Data bus line 2
10 DB3 0/1 I/O Data bus line 3
11 DB4 0/1 I/O Data bus line 4
12 DB5 0/1 I/O Data bus line 5
13 DB6 0/1 I/O Data bus line 6
14 DB7 0/1 I/O Data bus line 7 (MSB)