I have a data stream from an existing product I'm trying to get into my uLCD_32DT via COM0 RX and 4D-UPA as a breakout, it's a little unconventionally formatted which I have no control over. It's 72 byte packets of 9-bit words with single start and stop bits but in reality that's conventional 8-bit data with the occasional byte flagged as special by abusing the parity bit.
I'm hoping I can use the parity function of the UART to read the 9th bit keeping the 8-bit data synchronised into the buffer [ com_Mode(8, 'E', 1, COM0) ] and since I'm not interested in the 9th bit I plan to just ignore the expected random parity errors. However I'm struggling to get this working and as I can't find exactly what happens when a parity error is detected I'm not sure if the problem is with my understanding of: the Diabalo UART, the data stream I'm looking at, the 4D_UPA or perhaps my wiring. I ran a search and there's almost no mention of parity in the Diabolo Internal Functions sheet beyond enabling it in the UART.
Does incorrect RX parity just cause the COM_ERROR flag to be set harmlessly but the bytes continue to be read into read into the buffer anyway? Parity isn't specifically mentioned under the com_Error() command's notes. Or is the erroneous byte just dumped out of the buffer meaning my hack is doomed?
The 4D-UPA is disconnected from the USB lead and the 32DT is powered from the product I'm trying to read so there shouldn't be a clash there though I could try COM1 instead I suppose since it won't be wired to the USB bridge chip. It's 5V TTL data.
Cheers, James
I'm hoping I can use the parity function of the UART to read the 9th bit keeping the 8-bit data synchronised into the buffer [ com_Mode(8, 'E', 1, COM0) ] and since I'm not interested in the 9th bit I plan to just ignore the expected random parity errors. However I'm struggling to get this working and as I can't find exactly what happens when a parity error is detected I'm not sure if the problem is with my understanding of: the Diabalo UART, the data stream I'm looking at, the 4D_UPA or perhaps my wiring. I ran a search and there's almost no mention of parity in the Diabolo Internal Functions sheet beyond enabling it in the UART.
Does incorrect RX parity just cause the COM_ERROR flag to be set harmlessly but the bytes continue to be read into read into the buffer anyway? Parity isn't specifically mentioned under the com_Error() command's notes. Or is the erroneous byte just dumped out of the buffer meaning my hack is doomed?
The 4D-UPA is disconnected from the USB lead and the 32DT is powered from the product I'm trying to read so there shouldn't be a clash there though I could try COM1 instead I suppose since it won't be wired to the USB bridge chip. It's 5V TTL data.
Cheers, James
Comment