Can i store a int into a char if result is less than 255 ? or i need to store only the lower byte?
unsigned char mychar[10]; unsigned int intvalue; intvalue = 1000; intvalue = 1000 - 950;//value now is 50 mychar[0] = intvalue;//i think it is a problem trying to stores a 2 bytes var into 1 byte
Another is... when i use atoi returns 16 bits or 8 bits?
unsigned char day; unsigned char daytext[3]; daytext[0] = '1'; daytext[1] = '0'; daytext[2] = 0x00; day = atoi(daytext);//i think we re going to have a problem here
Thanks a lot
Keil knows how to take low part of word.
This has nothing specifically to do with Keil!
The 'C' programming language has well-defined rules for what happens when you assign between different variable types.