Announcements

Equip yourself to optimize AURIX™ MCUs for Evs at the EV Webinar. Click here to register.

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

AURIX™ Forum Discussions

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
First like given 25 likes received 50 solutions authored

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
First like given 25 likes received 50 solutions authored

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