RCM6760 UART bug: serial D E F : 9600bps 8N2
baud rate is ok.
first byte generate ONLY 1 stop bit.
after second byte generate 2 stop bit.
I think I see the error in RS232.LIB that causes this problem.
In spx_starttx(), it isn’t checking for the 2-stop-bits flag before loading the byte to send. Later, in spx_isr(), it checks that flag and correctly uses SxLR_OFS instead of SxDR_OFS.
I don’t have a system set up where I can test this code, but it should work. Just replace everything between .send and .exit in spx_starttx() of RS232.LIB with the following:
.send:
_READ_BIT_(SER_BIT_TWOSTOP)
jr z, .normal_stop
ioi ld (iy+SxLR_OFS), L ; send with an extra stop bit
jr .load_done
.normal_stop:
ioi ld (iy+SxDR_OFS), L ; normal send
.load_done:
.exit:
Please let me know if that works for you.
Tested and released on GitHub. https://github.com/digidotcom/DCRabbit_10/commit/c7d6a7ded4a3d78c6d38e77c08a8e55e52c5ed4c
hi tom,
I replace your code as you described…
your code fix the bug…
the serial working 8N2 correctly.
thank you!
Hello, im trying to get rid of the start bit, anyone knows how to?
Please ask this as a new question in the forum, and include additional background information on what you’re trying to accomplish, and what you’ve already tried.