Lab#1

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

Aim :- Study the AES 51 development board and execute assembly language

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 :-

1. Power up the AES-51 Computer Board by using AC Adaptor.


2. Press Test key at the key pad.
3. Start and continued testing till the Test #4
4. Press Test key to move to the next test and any key except Test to
repeat current test.

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”

There are 5 pin are available in digital output as follows,

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”

There are 5 pin are available in analog I/O block as follows,

PRB

A/D

GRD
D/A

P13

Analog I/O Block

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 :-

1. Draw the block diagram.


2. Create the ALP.
3. Arrange the system as the above diagram.
4. Obtained the object file (hex file) from the source file (ALP) by compiling it.
5. Check whether there existing errors in the ALP by using simulator & fixed them.
6. Connect AES-51 Microcontroller to PC using serial cable.
7. Configure the TE (Terminal Emulator) according to the COM1.
8. Upload the hex file in to the RAM of the AES-51 board by using software TE &
execute the program & observe result.

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

BB: MOV A,R2


ADD A,#5D
MOV R2,A
SUBB A,#10D
JNC B1
SJMP AA

B1: INC R1
MOV R2,A

AA: MOV A,R1


ADD A,#5D
MOV R1,A
SUBB A,#10D
JNC B2
SJMP A1

B2: INC R3
MOV R1,A

A1: MOV A,R3


ADD A,#2D
MOV R3,A
DEC R6
LJMP CHECK
4
DISPLAY:

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 :-

• Timer value is less than 999.

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.

You might also like