uint8_t range of values

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

uint8_t range of values

2,296 次查看
vnv
Contributor II

Hi,

I use the LPC11C24 development board, the use of uint8_t (unsigned char) type of array. Found it can only be in the value of 0 to 127, in fact it should be 0 to 255. The highest bit can not be used, which is why?

标签 (1)
0 项奖励
回复
3 回复数

1,930 次查看
converse
Senior Contributor V

Works (correctly) for me. What is your code, and how are you checking your values?

0 项奖励
回复

1,930 次查看
vnv
Contributor II

hi,

My screenshot is as follows:

pastedImage_1.png

pastedImage_3.png

This is a program I developed with SPI,Please take a look Tx_Buf[3] ,Tx_Buf[4], Tx_Buf[5] ,Tx_Buf[6] ,The value in memory.The highest bit can not be used.

0 项奖励
回复

1,930 次查看
converse
Senior Contributor V

That is a bug in the display of your IDE, nothing wrong with the code or the values. Complain to your IDE vendor.

Here is the output in MCUXpresso

2017-06-02 12.47.31 pm.png

2017-06-02 12.47.43 pm.png

0 项奖励
回复