KEMBAR78
8051 Code To Convert BCD To ASCII | PDF | Technology & Engineering
0% found this document useful (0 votes)
5K views3 pages

8051 Code To Convert BCD To ASCII

To convert packed BCD to ASCII, it must first be converted to unpacked BCD. Then the unpacked BCD is tagged with 30H.

Uploaded by

Robin Banerjee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5K views3 pages

8051 Code To Convert BCD To ASCII

To convert packed BCD to ASCII, it must first be converted to unpacked BCD. Then the unpacked BCD is tagged with 30H.

Uploaded by

Robin Banerjee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Dayananda Sagar University

Department: Electronics And Communication

Subject: Microcontroller

Subject Code: 16EC301

Name and USN:


1. ROBIN BANERJEE (USN No. ENG17EC0086)
2. DEVESH GAUR (USN No.ENG18EC1005)
EXPERIMENT NUMBER: 4 B

TITLE: Conversion of BCD to ASCII number

PROGRAM: To perform the conversion of an 8-bit BCD number to two ASCII.

CODE:

ORG 0000H

MOV R0,#30H

MOV A,R0

ANL A,#0FH

ADD A,#30H

MOV R1,A

MOV A,R0

SWAP A

ANL A,#0FH

ADD A,#30H

MOV R2,A

END
OUTPUT: (PRINT SCREEN)

CONCLUSION:

To convert packed BCD to ASCII, it must first be converted to unpacked BCD. Then the
unpacked BCD is tagged with 30H.

You might also like