How to Set hexadecimal data display format in the Terminal window  of the Hiwave?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Set hexadecimal data display format in the Terminal window  of the Hiwave?

683 Views
xiaochenqiang
Contributor II

Hi:

  I am working on the Virtual SCI,I have received date in the Terminal window,but I want the data display in hexadecimal format ,How to set it?Thank you!

Labels (1)
Tags (1)
0 Kudos
3 Replies

577 Views
Martin35804
NXP Employee
NXP Employee

Hi,

you will have to make a conversion function from whatever format your get to hex.

or by using a printf function:

int a = 3;
printf
("0x%x\n", a);

this will give you 0x3

0 Kudos

577 Views
iggi
NXP Employee
NXP Employee

The data (characters) you sent to PC terminal should be displayed as they were sent.

So, it depends on what you actually send to terminal.

In this case, a simple putc() would work.

//=============================int k;

 

for (k = 0; k<100; k++) {

     putc(k);

}

//=============================

btw, what MCU do you use?

0 Kudos

577 Views
xiaochenqiang
Contributor II

why no one reply to the question?

0 Kudos