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.

send hex and decimal data to serial port

Status
Not open for further replies.

embed_v

Junior Member level 1
Joined
Aug 10, 2010
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,432
hiiii
i am implimenting an serial port using UART in C ,on CORTEX M3 LM3S600,UV4


SO I WANT TO SEND AN HEX AND DECIMAL FORMATTED DATA TO PORT
HOW TO DO THIS???????
GIVE ME THE IDEA FOR HEX AND DECIMAL IMPLIMENTED IN (FUNCTION) C.


THANX
EMBED_V
 

Hello!

Don't talk so loud!

I'm not sure about what you want to do. You can send bytes to a UART.
So it's your job to fit what you have into bytes.
If you want to send the string "hello", then you have basically nothing
to do. Just send each character in a loop.
If you want to send a number, then divide it into bytes, and send
each byte in a loop. And it's up to you to send most or least significant
byte first.

By the way, what do you mean by "decimal formatted data"? Is it the
ASCII string representing your number? In this case, print your number
into a string and send the string.

Conclusion: be accurate! Tell us what you want to send, and it might be easier
to tell you what to do.

Dora.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top