lab#1

7
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, 1

Upload: anusanji

Post on 19-Nov-2014

265 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Lab#1

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 boardSeven Segments (03)Personal computerBCDDe-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 #44. 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,

Digital Output

1

P 1 0

P 1 1

P 1 4

P 1 5

+5V

P 1 6

P 1 7

Page 2: Lab#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,

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,

Analog I/O Block

2

I 0 / INT0

GRD

I 1 / INT 1

I 2 / T 1

I 3 / T 0

A/D

GRD

PRB

D/A

P 1 3

Page 3: Lab#1

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

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

DE- MUX

7404

8051 BCD

P 1 0

P 1 1

Page 4: Lab#1

Program :-ORG 7000H

P1 DATA 090HTLO DATA 08AHTHO DATA 08CH

B DATA 0F0HMOV THO,#02HMOV TLO,#025H

START: MOV R6,THOMOV R5,TLO

MOV A,R5MOV B,#100DDIV ABMOV R3,AMOV A,BMOV B,#10DDIV ABMOV R1,AMOV R2,B

CHECK: MOV A,R6CJNE A,#00D,BBLJMP DISPLAY

BB: MOV A,R2ADD A,#5DMOV R2,ASUBB A,#10DJNC B1SJMP AA

B1: INC R1MOV R2,A

AA: MOV A,R1ADD A,#5DMOV R1,ASUBB A,#10DJNC B2SJMP A1

B2: INC R3MOV R1,A

A1: MOV A,R3ADD A,#2DMOV R3,ADEC R6LJMP CHECK

4

Page 5: Lab#1

DISPLAY:

MOV A,#030HORL A,R2SWAP ACPL AMOV P1,AMOV R7,#0FFHDJNZ R7,$

MOV A,#020HORL A,R1SWAP ACPL AMOV P1,AMOV R7,#0FFHDJNZ R7,$

MOV A,#010HORL A,R3SWAP ACPL AMOV P1,AMOV R7,#0FFHDJNZ 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.

5