| ??? 11/11/04 10:37 Read: times |
#81030 - RE: UART 9-Bits Mode Operation Responding to: ???'s previous message |
hi,
No time to look at code deeply, but in short, I think you confused with logical operations. Use direct load when it is possible. Look here:
if(nine) { // receive HHHHLLLL
high |= (a&0xF0) >> 4; // high: 0000HHHH <- replace with high = (a&0xF0) >> 4;
low |= (a&0x0F) << 4; // low: LLLLXXXX <- replace with low = (a&0x0F) << 4;Next: else if(flag) { // receive LLLLHHHH
low = (a&0xF0) >> 4; // low = LLLLLLLL <- replace with low |= (a&0xF0) >> 4;
//...
high |= a&0x0F; // high: 0000HHHH <- replace with high = a&0x0F;Finally: else { // receive LLLLLLLL
low |= a; // low: LLLLLLLL <- replace with low = a;
Regards, Oleg |
| Topic | Author | Date |
| UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
| RE: UART 9-Bits Mode Operation | 01/01/70 00:00 | |
RE: SPI vs UART 9-Bits Mode | 01/01/70 00:00 |



