0% found this document useful (0 votes)
79 views

Lab 10B Look-Up Table and Ascii Code Conversion: Lab Manual For "The 8051 Microcontroller "

This document describes a lab activity to write a program using a look-up table to convert binary data from keypad switches to ASCII codes. The program will display the ASCII numbers or characters on an LCD or terminal. Students will connect switches to an 8051 microcontroller board and write code to convert binary input to ASCII output for numbers 0-F and letters A-Z. The worksheet asks students to provide ASCII values and write simple programs to convert between uppercase and lowercase letters.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Lab 10B Look-Up Table and Ascii Code Conversion: Lab Manual For "The 8051 Microcontroller "

This document describes a lab activity to write a program using a look-up table to convert binary data from keypad switches to ASCII codes. The program will display the ASCII numbers or characters on an LCD or terminal. Students will connect switches to an 8051 microcontroller board and write code to convert binary input to ASCII output for numbers 0-F and letters A-Z. The worksheet asks students to provide ASCII values and write simple programs to convert between uppercase and lowercase letters.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

LAB 10B

LOOK-UP TABLE AND ASCII CODE CONVERSION


OBJECTIVE:
To write a program to perform code conversion using look-up table.
REFERENCE:
Mazidi and McKinlay, The 8051 Microcontroller .., Chapter 7 and 10.
MATERIALS:
8051 Keil Compiler.
MDE8051 Trainer
Many keypads provide the data in binary. To display the keypad data
on LCD or HyperTerminal (Tera Terminal), it needs to be converted to ASCII.
This Lab deals with code conversion using look-up table.
ACTIVITY 1
Connect the pins of P1.3-P1.0 to switches on 8051 Trainer. Then, write
a program to convert the binary data on switches to an ASCII number for 0-F
and display it on HyperTerminal (Tera Terminal) of the x86 PC.
AN INTERESTING ACTIVITY
Connect the pins of P1.7-P1.0 to switches on 8051 Trainer. Then, write
a program to display ASCII character of the binary data input from switches
on P2 and HyperTerminal (Tera Terminal) of the x86 PC.
Change the value son switches and examine the HyperTerminal
(Tera Terminal) screen. Try binary numbers of 01000001 (ASCII code letter
A), 01000010 (ASCII code for letter B) and so on. See Appendix F in your
textbook for ASCII codes.

Lab Manual for The 8051 Microcontroller

LAB 10B
WORKSHEET

Name:

Date:

Class:

1. Give the ASCII value for numbers 0-9.

2. Give the ASCII value for letters A and Z.

3. Give the ASCII value for letters a and z.

4. Compare the ASCII value for letters A and a. What is difference between
them?

5. Compare the ASCII value for letters Z and z. What is difference between
them?

6. Write a simple 8051 program to change from A to a.

7. Write a simple 8051 program to change from z to Z.


Lab Manual for The 8051 Microcontroller .

LAB 10B
LOOK-UP TABLE AND ASCII CODE CONVERSION

Lab Manual for The 8051 Microcontroller

You might also like