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

Lab 6B Binary To Ascii Conversion: Lab Manual For "The 8051 Microcontroller ."

This document provides instructions for two activities to practice binary to ASCII conversion using an 8051 microcontroller trainer. The first activity has students write a program to convert a byte of data from switches on port 1 to ASCII and display it on port 2 LEDs. The second activity has them convert specified ASCII values to binary and display the results on port 2. The objective is to practice a program for BCD to ASCII conversion using an 8051 microcontroller and trainer.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

Lab 6B Binary To Ascii Conversion: Lab Manual For "The 8051 Microcontroller ."

This document provides instructions for two activities to practice binary to ASCII conversion using an 8051 microcontroller trainer. The first activity has students write a program to convert a byte of data from switches on port 1 to ASCII and display it on port 2 LEDs. The second activity has them convert specified ASCII values to binary and display the results on port 2. The objective is to practice a program for BCD to ASCII conversion using an 8051 microcontroller and trainer.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

LAB 6B

BINARY TO ASCII CONVERSION


OBJECTIVE:
To write a program to perform BCD to ASCII conversion.
REFERENCE:
Mazidi and McKinlay, The 8051 Microcontroller , Chapter 6 or 7.
MATERIALS:
8051 Keil assembler .
MDE8051 Trainer
Binary-to-ASCII conversion is widely used by ADC and sensors.
ACTIVITY 1
Connect the pins of P1 to DIP switches on 8051 Trainer. Then, Write a
program to get a byte of binary data from P1 switches (00-0xFF) and after
converting it to ASCII display the result on LEDs of P2 (example 0xFF
becomes 323535). Place a 2-second delay in between each of three ASCII
showings so you can examine the result. Run the program to verify it works.
ACTIVITY 2
Write a program to convert the following ASCII to binary and display
the result on LEDs of P2.
ASCII_1
ASCII_2
ASCII_3

EQU $31
EQU $39
EQU $35

; Least significant digit


; Mid digit
; Most significant digit

Lab Manual for The 8051 Microcontroller .

LAB 6B
WORKSHEET

Lab Manual for The 8051 Microcontroller .

You might also like