pic ccs compiler hex output in serial port

Status
Not open for further replies.

sijincool

Member level 2
Joined
Feb 10, 2010
Messages
43
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
india
Activity points
1,611
anybody pls help me.
i need to get data in hex format from the pic18f452 serial output.
but when i use printf with%x it just prints hex in readable form

Added after 39 seconds:

that i si dont want ascii just plain hex
 

Can you share a snap shot of the output u get?
--
Amr Ali
 

above is the snap shot.
left side shows the ascii and right side hex representaion of the output.

i want the out put in hex not in ascii.
pls help

Added after 1 minutes:

 

You can just use: putc(x).

Or, if your data are bigger than 8 bits:

long x; // Where x is a 32 bit data

putc(make8(x,3));
putc(make8(x,2));
putc(make8(x,1));
putc(make8(x,0));
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…