Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Binary to ASCII

Status
Not open for further replies.
That would be decimal not binary.

Mike.
Edit, you need a print decimal routine.
 
Here is a program I use to display the output of an IN219 as ASCII text. It contains subroutines to do what you want but is is written to run on a PIC12F1840 so may require slight changes to run on a PIC16F877. It also contains code to display HEX values in ASCII


Les.
 

Attachments

  • V_Monitor_V02.asm
    15.8 KB · Views: 231
Sir please will you upload the complete assembly code of bin to ascii using pic 16f877a please sir
 
Can you clarify want you want ? You say 8 bit binary to 8 character ASCII. 8 bit binary has a maximum value or 255 decimal (Or FF hex) so you would only need 3 ASCII characters. I'm not sure I have written a version that will give 8 ASCII character output (This would be 28 binary bits) for a PIC16F877. I tend to use these routines quit a lot and just modify them to run on different PICs (Or Atmel Attiny chips.) and different number of bits as required. I will have to look though my projects that use PIC16F877s and see if I have one that meets your exact requirements as you do not want to modify the one I posted in post #13

Les.
 
Last edited:
It is not specified 8 bit binary or other they just given problem statement just convert binary to ASCII using pic 16f877a in assembly language
 
It is not specified 8 bit binary or other they just given problem statement just convert binary to ASCII using pic 16f877a in assembly language
Why don't you look here on ETO.. Nigel has done free code that does exactly what you want Look in the signature for
 
Is this homework ? The way you state the question in post #18 is ambiguous. It could mean convert it into a decimal value and convert that into ASCII to display it in decimal format. It could also mean just display it in hexadecimal as ASCII characters.

Les.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top