2014-02-21 07:17 AM
PLz can some one tell me why we must ''&'' the received value with 0x7F!!!!!!
2014-02-21 08:04 AM
''PLz can some one tell me why we must ''&'' the received value with 0x7F''
There is no absolute need to bit wise AND with 0x7F! It is probably there to support 7bit data width for the RS232 standard.2014-02-21 08:20 AM
It is probably there to support 7bit data width for the RS232 standard.
Or strip parity, ST's definition of data bit includes the parity bit, the USART_DR can contain up to 9-bits. Masking covers a couple of ill's including stopping some compilers warning as you cast from a 16-bit unsigned int to an 8-bit signed/unsigned char. There is generally much disagreement as to whether a char is signed or unsigned, many compilers/os have their own ideas, with defaults, or overrides.2014-02-21 02:31 PM
thks 4 help :)