Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Orange
Level 1
Level 1
First reply posted First question asked Welcome!

I'm learning examples through Uart communication. Among the built-in examples, I studied to print "HELLO world" through an example called UART_VCOM. Currently, I tried to create an example of outputting numeric variables through applied study, but it didn't work out. Can I get help?

0 Likes
1 Solution
Nambi
Moderator
Moderator
Moderator
500 replies posted 50 likes received 5 likes given

Hi,

In the UART_VCOM example, you can use below configurations in the function send_UART_message()
a) uint8 txData[] = "012"; /* Message to send */
Ifx_SizeT count = 3;

b) uint8 txData[] = {48,49,50}; /* Message to send */
Ifx_SizeT count = 3;

Both these will print 012 in the COM terminal. The values displayed are based on the ASCII values.

The ASCII values corresponding to the numeric variable need to be used to display those numbers.

Best Regards.

View solution in original post

0 Likes
1 Reply
Nambi
Moderator
Moderator
Moderator
500 replies posted 50 likes received 5 likes given

Hi,

In the UART_VCOM example, you can use below configurations in the function send_UART_message()
a) uint8 txData[] = "012"; /* Message to send */
Ifx_SizeT count = 3;

b) uint8 txData[] = {48,49,50}; /* Message to send */
Ifx_SizeT count = 3;

Both these will print 012 in the COM terminal. The values displayed are based on the ASCII values.

The ASCII values corresponding to the numeric variable need to be used to display those numbers.

Best Regards.

0 Likes