S Suraj143 Active Member Jan 21, 2010 #1 Can somebody tell me how to configure the UART for 1200bps on 7bit data & even parity with start & stop bits.OSC is 4MHz. Thanks Last edited: Jan 21, 2010
Can somebody tell me how to configure the UART for 1200bps on 7bit data & even parity with start & stop bits.OSC is 4MHz. Thanks
D Diver300 Well-Known Member Most Helpful Member Jan 22, 2010 #2 What PIC is it on? You need to write some code to decide the parity bit.
S Suraj143 Active Member Jan 25, 2010 #3 Cant I use the UART module to receive data? 7bit data & even parity means is it 8 bit? so why I cant use the standard UART module & ignore the MSB that is parity bit in this case. I want to do this with UART module. Last edited: Jan 25, 2010
Cant I use the UART module to receive data? 7bit data & even parity means is it 8 bit? so why I cant use the standard UART module & ignore the MSB that is parity bit in this case. I want to do this with UART module.
Nigel Goodwin Super Moderator Most Helpful Member Jan 25, 2010 #4 Of course you can - as already mentioned, you would need to write code to handle the parity bit - check it, or discard as required.
Of course you can - as already mentioned, you would need to write code to handle the parity bit - check it, or discard as required.
S Suraj143 Active Member Jan 25, 2010 #5 Nigel thanks. I still wondering what code do I need to write why can't i just ignore the MSB of the receive byte ? So I need only to read the buffer. You mean what code to write? Last edited: Jan 25, 2010
Nigel thanks. I still wondering what code do I need to write why can't i just ignore the MSB of the receive byte ? So I need only to read the buffer. You mean what code to write?
Nigel Goodwin Super Moderator Most Helpful Member Jan 25, 2010 #6 Suraj143 said: Nigel thanks. I still wondering what code do I need to write why can't i just ignore the MSB of the receive byte ? So I need only to read the buffer. You mean what code to write? Click to expand... It's not like you need to write a lot If you want to ignore the parity bit, then simply write code to AND it and mask that bit off. One line is all you need to add.
Suraj143 said: Nigel thanks. I still wondering what code do I need to write why can't i just ignore the MSB of the receive byte ? So I need only to read the buffer. You mean what code to write? Click to expand... It's not like you need to write a lot If you want to ignore the parity bit, then simply write code to AND it and mask that bit off. One line is all you need to add.