- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HAI
I want to convert Hex to Dec value and that decimal value display on pc using UART , Now how can i send decimal value to UART ,which logic is apply here. plz help me for programing
Solved! Go to Solution.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One way is to use the C compiler function - utoa() to convert from unsigned integer to a string and then use UART function - UART_PutString()
utoa() function accepts argument to set the base. For details refer C Language Compiler user guide.pdf in the documentation directory of PSoC designer installation folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One way is to use the C compiler function - utoa() to convert from unsigned integer to a string and then use UART function - UART_PutString()
utoa() function accepts argument to set the base. For details refer C Language Compiler user guide.pdf in the documentation directory of PSoC designer installation folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can also refer the C language compiler guide here; Table 5-1 on Page 24 can help you with the description of all available APIs and the header that has it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is your question related to converting from hex to ASCII or are you asking for how to send characters through UART?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
my question is -->
suppose if i take decimal value 12345, how can i send to pc using UART ? which conditions are use in c language?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
my question is -->
suppose if i take decimal value 12345, how can i send to pc using UART ? which conditions are use in c language?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use the itoa(), ltoa(), ftoa() type functions, and send the character out
as a byte/char via UART send function, like
void UART_Write(char * aStr, BYTE bCnt)
Regards, Dana.