Escolar Documentos
Profissional Documentos
Cultura Documentos
CHAPTER 1: INTRODUCTION
1. WELCOME
3) KEYBOARD CONNECTOR :
5) LCD CONNECTOR
amp
3.1 RESET
This key is located in the main PS board. On depressing
this key the program starts executing from the beginning
i.e. at reset address 0000. On power on reset message PS
8051 is displayed in local LCD display.
EXAMPLE:
A8500
EXAMPLE:
MOV A, R0 (ENTER key =
M
O
V
Space bar
A
,
R
0
Enter key
EXAMPLE:
INC A
Typing sequence,
I
N
C
Space bar
A
Enter key (ENTER Key
IMPORTANT INSTRUCTIONS
MOV A, @DPTR
MOV A, @R0
EDITING
4.4 DISASSEMBLER
EXAMPLE:
74 AA
MOV A, #AA
To see the next line depress space bar key. Display is,
8502
00
NOP
ENTERING ADDRESS
After depressing this key, the system is ready to accept
from the keyboard and the board displays the data of the
selected memory address. Depressing any other non-hex
key results in error and the current command and once
again waits for new command.
ENTERING DATA
Now, if required, entering the new data can modify data
at the desired address. Entry of data is also similar to that
of address. Terminator for data is cursor up key or cursor
down key or space or enter key. Thus it is possible to load
the opcode/data in memory and verify it using M
(MDFY), UP and DOWN keys.
Join the Technical Community Today!
http://www.pantechsolutions.net
EXAMPLE:
EXAMPLE:
EXAMPLE:
G8850
NOTE: Space bar key doesnt select the baud rate and its
used to display the succeeding baud value only.
4.8 R (REGISTER DISPLAY/MODIFY)
When this key is depressed it displays current register
contents one after another. After depressing this key the
board waits for the register number and enter key from
the user.
EXAMPLE:
9000
90FF
9800
program variables).
Internal RAM
User Interrupts
CS6
CS7
CS8
CS9
CS10
4040 405F
4060 407F
4080 409F
40A0 40BF
40C0 40DF
5.3 BREAKPOINT:
When writing program it is essential to debug them and
for this break points are necessary. Normally these are
achieved by using software Break points. However 8051
does not have any such facility. Other conventional
Join the Technical Community Today!
http://www.pantechsolutions.net
Press ENTER
Key.
FIRST DATA
:
address : 40 TO 43 MSB IN 40
40
SECOND DATA : 50 address : 50 TO 53
MSB IN
50
RESULT DATA : 60 address : 60 TO 63
MSB IN
60
PROGRAM:
ADDRES
S
8500
8501
CLR C
MOV A, 43
8503
8505
8507
35 53
F5 63
E5 42
ADDC A, 53
MOV 63,A
MOV A, 42
8509
35 52
ADDC A, 52
850B
F5 62
MOV 62, A
850D
E5 41
MOV A, 41
850F
35 51
ADDC A, 51
8511
F5 61
MOV 61, A
8513
E5 40
MOV A, 40
8515
8517
8519
35 50
F5 60
12 00 BB
ADDC A, 50
MOV 60, A
ADDR 61
Move the 1st MSB data from ADDR 40 to
ACC
Add ACC with 2nd MSB data in ADDR 50
Store the MSB data from ACC to ADDR 60
LCALL 00BB Break point
Press ENTER
Key.
Then enter the data and press space bar from
keyboard for entering the next data
EX: i0040
EX: i0050
EX: i0060
FIRST DATA : 40
address : 40 TO 43 MSB IN
40
SECOND DATA : 50 address : 50 TO 53 MSB IN
50
RESULT DATA : 60 address : 60 TO 63 MSB IN
60
PROGRAM:
PROGRAM:
For Example: Reset the kit and then enter, i0060 Press
ENTER Key.
No = 40
Beg = 8F00
PROGRAM:
ADDR
ESS
8500
8502
8504
8506
8508
850B
OPCOD
E
A8 60
79 01
7A 01
74 00
90 8F 00
B8 00 03
MNEMONICS
COMMENTS
MOV R0, 60
MOV R1, #01
MOV R2, #01
MOV A, #00
MOV DPTR,#8F00
CJNE R0, #00, 8511
850E
8511
8512
8513
8514
8515
8518
8519
851A
02 85 1C
F0
A3
FA
29
85 02 01
F0
A3
D8 F7
LJMP 851C
MOVX @DPTR, A
INC DPTR
MOV R2, A
ADD A, R1
MOV R1,R2
MOVX @DPTR, A
INC DPTR
DJNZ R0, 8513
851C
12 00 BB LCALL 00BB
0089
equ
008d
equ
008b
equ
088e
equ
0098
equ
0099
equ
= tmod:
89h
= th1:
8dh
= tl1:
8bh
= tr1:
8eh
= scon:
98h
= sbuf
99h
PROGRAM:
INPUT:
8501 = 12
8503 = 12
RESULT:
8600 = 24.
2. 8-BIT SUBTRACTION:
INPUT:
8501 = 20
8503 = 10
RESULT:
8600 = 10.
3. 8-BIT MULTIPLICATION:
INPUT:
8501 = 0A
8504 = 88
RESULT:
8600 = 50 (LSB)
8601 = 05 (MSB)
4. SETTING BITS IN AN 8-BIT NUMBER:
INPUT:
8501 = 2F
8503 = 45
RESULT:
8600 = 6F.
Join the Technical Community Today!
http://www.pantechsolutions.net
INPUT:
8501 = 87
8503 = 7E
RESULT:
8600 = 06.
1) 16-BIT ADDITION of two numbers:
OBJECTIVE:
THEORY:
RESULT:
PROGRAM
Join the Technical Community Today!
http://www.pantechsolutions.net
PROCEDURE
1. Enter the input data in memory location 8500 to 8503.
2. Enter the above opcodes from 8500.
3. Execute the program.
4. Result stored in 8600 & 8601. Change data and check
result in 8600, 8601.
THEORY:
RESULT:
8700 MSB
8701 LSB
PROCEDURE
1. Enter the input data in memory location 8600 to 8603.
Join the Technical Community Today!
http://www.pantechsolutions.net
THEORY:
8600 - Multiplicand
Join the Technical Community Today!
http://www.pantechsolutions.net
8601 - Multiplier
RESULT:
8700
PROCEDURE
1. Enter the input data in memory location 8600 to 8601.
2. Enter the above opcodes from 8500.
3. Execute the program.
THEORY:
PROGRAM
PROCEDURE
1. Enter the input data in memory location 8600 to 8601.
2. Enter the above opcodes from 8500.
3. Execute the program.
4. Result stored in 8700 & 8701. Change data and check
result in 8700, 8701
5) FACTORIAL OF A GIVEN NUMBER:
OBJECTIVE:
Join the Technical Community Today!
http://www.pantechsolutions.net
PROGRAM
PROCEDURE
PROGRAM
MNEMONICS
8500
8503
8504
8505
8508
8509
850A
850C
850E
850F
8511
8512
8515
8516
8517
8518
8519
851A
851B
851C
851D
851E
8520
8523
8524
8525
MOV DPTR,#8600H
MOVX A,@DPTR
MOV R0,A
MOV DPTR,#8601H
MOVX A,@DPTR
MOV R1,A
MOV R2,#00H
MOV R3,#08H
LOOP: MOV A,R1
ANL A,#01H
MOV R4,A
CJNE R4,#01H,LOOP1
MOV A,R2
ADD A,R0
MOV R2,A
LOOP1: MOV A,R0
RL A
MOV R0,A
MOV A,R1
RR A
MOV R1,A
DJNZ R3,LOOP
MOV DPTR,#8700H
MOV A,R2
MOVX @DPTR,A
E:
SJMP E
90 86 00
E0
F8
90 86 01
E0
F9
7A 00
7B 08
E9
54 01
FC
BC 01 03
EA
28
FA
E8
23
F8
E9
03
F9
DB EE
90 87 00
EA
F0
80 FE
PROCEDURE
1. Enter the input data in memory location 8600 & 8601.
2. Enter the above opcodes from 8500.
ADDRESS OPCODES
90 86 00
E0
F8
90 86 01
E0
F9
7D 00
7A 01
C3
EA
98
60 1B
EA
99
60 17
E8
8A F0
84
E5 F0
MNEMONICS
MOV DPTR,#8600H
MOVX A,@DPTR
MOV R0,A
MOV DPTR,#8601H
MOVX A,@DPTR
MOV R1,A
MOV R5,#00H
MOV R2,#01H
TOP1: CLR C
MOV A,R2
SUBB A,R0
JZ TOPY
MOV A,R2
SUBB A,R1
JZ TOPY
MOV A,R0
MOV B,R2
DIV AB
MOV A,B
851D
8520
8521
8523
8524
8526
8529
852A
852B
852C
852E
852F
8532
8533
B4 00 0B
E9
8A F0
84
E5 F0
B4 00 02
EA
FD
0A
80 E0
ED
90 87 00
F0
80 FE
CJNE A,#00H,TOPX
MOV A,R1
MOV B,R2
DIV AB
MOV A,B
CJNE A,#00H,TOPX
MOV A,R2
MOV R5,A
TOPX: INC R2
SJMP TOP1
TOPY: MOV A,R5
MOV DPTR,#8700H
MOVX @DPTR,A
E:
SJMP E
PROCEDURE
1. Enter the input data in memory location 8600 & 8601.
2. Enter the above opcodes from 8500.
3. Execute the program.
4. Result stored in 8700. Change data and check result in
8700
8) HCF of a given number
OBJECTIVE
To find HCF of a given number.
PROGRAM
ORG 8500H
PROCEDURE
Join the Technical Community Today!
http://www.pantechsolutions.net
MNEMONICS
MOV DPTR,#8600H
MOVX A,@DPTR
MOV B,A
MOV DPTR,#8650H
MOVX A,@DPTR
ADD A,B
MOV DPTR,#8700H
MOVX @DPTR,A
MOV DPTR,#8601H
MOVX A,@DPTR
MOV B,A
MOV DPTR,#8651H
MOVX A,@DPTR
ADD A,B
MOV DPTR,#8701H
MOVX @DPTR,A
8523
8524
8526
8529
852A
852C
852F
8530
8533
8534
8536
8539
853A
853C
853F
8540
E0
F5 F0
90 86 52
E0
25 F0
90 87 02
F0
90 86 03
E0
F5 F0
90 86 53
E0
25 F0
90 87 03
F0
80 FE
E:
MOVX A,@DPTR
MOV B,A
MOV DPTR,#8652H
MOVX A,@DPTR
ADD A,B
MOV DPTR,#8702H
MOVX @DPTR,A
MOV DPTR,#8603H
MOVX A,@DPTR
MOV B,A
MOV DPTR,#8653H
MOVX A,@DPTR
ADD A,B
MOV DPTR,#8703H
MOVX @DPTR,A
SJMP E
PROCEDURE
1. Enter the input data in memory location 8600 & 8603.
2. Enter the above opcodes from 8500.
3. Execute the program.
4. Result stored from 8700 & 8703.Change data and
check result in 8700 & 8703
10) FIBONACCI SERIES OF A NUMBER
OBJECTIVE:
Join the Technical Community Today!
http://www.pantechsolutions.net
PROCEDURE
1. Enter the input data in memory location 8600.
2. Enter the above opcodes from 8500.
3. Execute the program.
4. Result stored from 8601 . Change data and check
result in 8601
Join the Technical Community Today!
http://www.pantechsolutions.net
PROCEDURE
1. Enter the input data in memory location 8600.
2. Enter the above opcodes from 8500.
3. Execute the program.
4. Result stored from 8700 . Change data and check
result in 8700
[8602] = 76
[8603] = 89 [8604] = 98
[8605] = 49 [8606] = 45
[8607] = 9F [8608] = 57
[8609] = 7A
Result :[860A] = 9F
PROGRAM
What do we sell?
Our
products
range
from
Various
Microcontroller development boards, DSP Boards,
FPGA/CPLD boards, Communication Kits, Power
electronics, Basic electronics, Robotics, Sensors,
Electronic components and much more . Our goal is
to make finding the parts and information you need
easier and affordable so you can create awesome
projects and training from Basic to Cutting edge
technology.