Lab#1
Lab#1
Lab#1
programs.
Objectives :-
• Familiar with the software tools for microprocessor programming.
• Understanding about assembler (ASM) file, List (LST) and HEX file.
• Identify the basic functions of AES – 51 development board.
Apparatus :-
AES-51 Microcontroller board
Seven Segments (03)
Personal computer
BCD
De-multiplexer (2 in to 4)
Experiment 1 :- Run the self test and familiar with the self test functions.
Procedure :-
Test #1
Test 1 is test digital output channels. When press test key once and “T1” will appear on LCD,
It’s shown that all four LEDs turned on for few second and then turned off. There are 7 pins (Cell) and
corresponding 04 LEDs (Circles) are available in digital output as follows,
+5V
P 14
P15
P16
P17
P10
P11
Digital Output
1
Test #2
Test 2 is test digital input channels. When all input channels are open it’s displayed as,
“T2 INPUT PORT # IS FF 11111111”
Then I1 is grounded & repeat test 2, and then it’s appeared as follows,
“T2 INPUT PORT # IS F7 11110111”
Then do the same test for I2, and then it’s appeared as follows,
“T2 INPUT PORT # IS DF 11011111”
Finally, do the test for I3, and then it’s appeared as follows,
“T2 INPUT PORT # IS EF 11101111”
I 1 / INT 1
I 0 / INT0
GRD
I2/T1
I3/T0
Digital Input
Test #3
Test 3 is test analog I/O block. Initially LCD should appeared as follows,
“T3 ADC# TO D/A IS 00 00000000”
Then connect +5v to the A/D input and repeated test 3. The following display should appear on the LCD,
“T3 ADC# TO D/A IS FF 11111111”
PRB
A/D
GRD
D/A
P13
2
Test #4
Test 4 is test serial port communication. We used light.asm file to communicate with serial port.
Serial Port
Experiment 2 :- Assembler the program that written in assignment #01 (Q 02) and observe
the result by using AES – 51 development board.
Block Diagram :-
7
4
0
4
DE- MUX
P 10
P11
BCD
8051
Procedure :-
3
Program :-
ORG 7000H
P1 DATA 090H
TLO DATA 08AH
THO DATA 08CH
B DATA 0F0H
MOV THO,#02H
MOV TLO,#025H
START:
MOV R6,THO
MOV R5,TLO
MOV A,R5
MOV B,#100D
DIV AB
MOV R3,A
MOV A,B
MOV B,#10D
DIV AB
MOV R1,A
MOV R2,B
CHECK:
MOV A,R6
CJNE A,#00D,BB
LJMP DISPLAY
B1: INC R1
MOV R2,A
B2: INC R3
MOV R1,A
MOV A,#030H
ORL A,R2
SWAP A
CPL A
MOV P1,A
MOV R7,#0FFH
DJNZ R7,$
MOV A,#020H
ORL A,R1
SWAP A
CPL A
MOV P1,A
MOV R7,#0FFH
DJNZ R7,$
MOV A,#010H
ORL A,R3
SWAP A
CPL A
MOV P1,A
MOV R7,#0FFH
DJNZ R7,$
SJMP DISPLAY
END
Assumptions :-
Discussion :-
In the first part of this laboratory exercise we are basically deals with identifying AES – 51
Microcontroller board. This sort of Microcontroller boards is very helpful to develop many projects.
Also it is very important to know about the safety factors of the board to make available it in healthy
manner.
The second experiment is based on Timers. The 8051 has two timers. They can be use either as
timers or as event counters. Both timer 0 & timer 1 are 16 bits wide. Since 8051 has an 8-bit
architecture, each 16- bit timers accessed as two separate registers of low byte and high byte (TLO,
THO). In this experiment we obtained values of both TLO & THO and display it on 03 seven
segments. So we have to use alternative dividing methods to convert 16 bit values in to 8 bit values
since 8051 architecture is based on 8 bit registers.