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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

1,620件の閲覧回数
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!

ラベル(1)
タグ(1)
0 件の賞賛
返信
3 返答(返信)

1,514件の閲覧回数
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 件の賞賛
返信

1,514件の閲覧回数
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 件の賞賛
返信

1,514件の閲覧回数
xiaochenqiang
Contributor II

why no one reply to the question?

0 件の賞賛
返信