Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

converting HEX coming from pic16f877 to ASCII

Status
Not open for further replies.

ecegelo

Newbie level 1
Joined
May 13, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
HELP!!----I want to know how to convert HEX coming from pic16f877 to ASCII in order to send message to the GSM module for it to be read easily.. thanks! :D
 

Can''t you change the code in the PIC to output ASCII itself? That will be the simplest and the most sensible solution.

Otherwise you can just design a simple combinational logic to convert Hex to ASCII.
 

if u use (hex | 0x30) i think sholud be converted to the ASCII value.... try to implement it in the code itself and take the ascii value out the port
 

Well if you can not set the output to ASCII, you could allways use an EPROM as a look up table. Great oldskool trick. Use the output of the PIC device (or anything else really you want converted) and connect them to the Address lines of the eprom, therefor for each unique address the data contined within the EPROM is the desired ASCII conversion. I did this a long time ago in college for a single chip converter solution...this was back in the 80s I must add. Choose the right EPROM, I used a 2716 which outputs 8 bits out. if your PIC data is wide use a larger chip to meet the data to address size requirement.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top