Documente Academic
Documente Profesional
Documente Cultură
AES51 development board allows the user to enter the programs in two ways. It allows the
user to insert the intel HEX file for the relevant program via the serial interface using the Terminal
Emulator (TE.EXE) program or the user can directly enter the opcodes in the intel HEX file to the
AES1's code memory using the given hex-keypad.
Before entering a program through the hex-keypad following steps must be followed.
From here each code can be entered and ENTER key is used to go to the next address. In this way
a program can be loaded to ASM51's code memory. Once loaded it can be executed by pressing
the PROG key once and the pressing the RUN key. For the FROM address 7000 must be given and
for the TO address the last address of the program is given. Any program can be loaded to the
AES51's code memory only using the hex file and the keypad.
Other way of loading the program is to use the serial interface and the Terminal Emulator
(TE.EXE). When using the emulator first it must be configured according to the given settings and
then it can be used to send the Intel HEX file to the board. This allows to load the program quickly
and this also minimizes the errors that can happen during entering the program.
During the lab session mainly 8 programs were developed and tested. During the creation
and testing of these programs our knowledge on AES51 board and 8051 microcontroller was
tested. Programs can be described briefly as follows.
PROGRAM 1:
As the first task the hex code given in the course material for the LED flash program was entered
manually ant tested.
PROGRAM 2:
Created a program to light up the LED according to our requirement and it was also loaded to the
board manually and tested.
PROGRAM 3:
Created a program to light up the LEDs when an input is given and to turn off the LEDs when a
different input is given.
PROGRAM 4:
Created program to display a single character on the LCD display of the AES51 board and loaded it
to the board manually and tested.
PROGRAM 5, PROGRAM 6:
Created a simple program using MCU 8051 IDE and examined the code memory and Stack using
the Virtual MCU devices provided in the IDE. Observed how stack is used during CALL instructions
and how relative addressing is used in jump instructions.
PROGRAM 7:
Created a program to display a number between 0 and 255 in the LCD display in 3 digits. To load
the program to the board serial interface was used.
PROGRAM 8:
Modified the previous program to display the result from the A/D conversion of the AES51 board.
Loaded the program using serial interface. Program was further modified to observe the A/D input
pin continuously and set the display to the last read digital value from the A/D converter.
LIST FILES
PROGRAM 2:
PROG1
PAGE 1
4 ;-----------Main Programme-------------------------
7006 7590BF 9 MOV P1, #10111111B ;Turn on next LED, Turn off
previous
16
17 ;------------Delay routine------------------------------
18
26 ;delay call
27
6 ;-----------Main Programme------------------------------
7003 20B3FD 10 OFF: JB I1, OFF ;Wait until input to turn on LEDs
700B 20B5FD 13 ON: JB I2, ON ;Wait for input to turn off LEDs
15
17
0091 2 ENB BIT 91H ;Declare strobe enable/disable bit 91H as ENB
6 ;----------Main Program---------------------------------
7003 7441 9 MOV A, #65 ;Set accumulator to the ASCII code of the
7012 80FE 17 JMP $;Loop infinietly to keep the LCD from resetting
18
19 ;----------Delay Routine--------------------------------
20
25
27
0000 C280 2 MAIN: CLR P0.0 ;set bit 0 of port o low(turn on LED)
0005 D280 4 SETB P0.0 ;set bit P0.0 high (turn off LED)
14
15 END
PROGRAM 6:
PROG5
PAGE 1
10 END
0091 2 ENB BIT 91H ;Declare strobe enable/disable bit 91H as ENB
9 ;-------Main Program-------------------------------
10
13
14 ;-------A/D Conversion----------------------------------
15
21
23
37 ;-------Set Display-----------------------------------------
38
702C 2430 39 DISP: ADD A, #48 ;Set ASCII value of the relevant number
(ASCII 0 =48)
7039 22 46 RET
47
48 ;------------Delay routine------------------------------
49
57 ;delay call
58
PROG9
PAGE 2
Vin (Measured) (V) Dout (Observed) Vin (Calculated) (V) Error (Vin(calc) – Vin Error %
(Measure))
= Dout x Vref/256
= Dout x (5/256)
1. This session was attended with the knowledge about AES51 board and 8051
microcontroller from previous lab sessions.
2. But referring the lab sheet and the course material was required as there was no previous
experience regarding entering the code with the keypad.
3. Initial understandings of CALL and JMP functions were incorrect. So had to ask for the help
of the instructor to describe them.
4. Variable resistor given in the last experiment had 3 pins. As there was no pin diagrams or
previous knowledge on how it’s pins are configured used the multimeter to find out the
required pins.
2. Challenges
1. Having to work alone. Although it was a challenge it provided more space to learn.
2. Inbuilt hex-keypad of AES51 board was not working properly. Key’s had to be pressed
gently or otherwise it tends to give wrong outputs.
3. USB to Serial converter used to connect the board to the computer was malfunctioning.
Had to swap several connectors to get it working.
4. Variable resistor used for the last experiment was broken. Had to replace it with a new one.
1. All the experiments had ups and downs but altogether all were completed successfully.
2. 1st and 2nd programs were completed successfully without any problems.
3. 3rd program was also completed successfully but had to go through the course material to
find out the correct port address.
4. First few attempts to do the 4th program failed. LCD screen gave the “MONITOR READY”
screen every time the code was executed. Finally it was successfully completed by
including an infinite loop at the end of the program.
5. Next failure was observed when the program to display a character on LCD was executed.
Initially it didn’t displayed the character correctly. Increasing the delay fixed the problem.
6. The program to display a 3 digit number was also failed initially as it printed an extra ‘e’
character at the end. Problem was due to an extra call for the display subroutine.
Removing it fixed the problem and it was also completed successfully.
8. So it can be said that all programs were completed successfully although several programs
were corrected few times.
4. Impacts
1. One of the main impacts this lab had was using a variable resistor instead of LVDT. This was
done because LVDT is a high cost equipment. Use of variable resistor instead of it simply
compensate the need of receiving varying analog signals to the ADC. And variable resistor
was used instead of LVDT as both of them has linear characteristics.
2. This lab also had several impacts on students learning experience and knowledge on
microcontroller programming. Impact this session had on students can be summarized into
few lines as follows.
a. Learned how to refer instructions correctly and grab the key idea in it.
b. Developed patience to work situations where bugs in code can be a real hard to
find.
c. Improved the ability to communicate with the instructors to learn new things and
to clear my doubts.
5. Future Improvements
1. Using at least one experimental setup using an actual LVDT for students to experience it
and to check their programs with it.
3. More sophisticated displacement sensors with new technologies like laser beam reflections
can be used in real world applications instead of LVDT.
4. Using sensors that are calibrated correctly and comes with a inbuilt ADC to minimize the
errors.
5. Instead of 8051 microcontroller newer microcontroller boards like “Arduino” can be used
as they provide easy interfacing and controlling techniques.