uint8_t range of values

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

uint8_t range of values

2,272 Views
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?

Labels (1)
0 Kudos
Reply
3 Replies

1,906 Views
converse
Senior Contributor V

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

0 Kudos
Reply

1,906 Views
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 Kudos
Reply

1,906 Views
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 Kudos
Reply