Home/Support/Support Forum/RCM6760 serial D,E,F 9600bps 8N2 ... first byte not generate 2 stop bit
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

RCM6760 serial D,E,F 9600bps 8N2 ... first byte not generate 2 stop bit

0 votes
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.
asked Aug 31, 2016 in Rabbit Software by marcosterada New to the Community (1 point)

Please log in or register to answer this question.

3 Answers

0 votes
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:
Code:
.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.
answered Sep 2, 2016 by TomCollins Veteran of the Digi Community (1,439 points)
edited Sep 2, 2016 by TomCollins
0 votes
hi tom,

I replace your code as you described...
your code fix the bug... :-)
the serial working 8N2 correctly.

thank you!
answered Oct 5, 2016 by marcosterada New to the Community (1 point)
0 votes
Hello, im trying to get rid of the start bit, anyone knows how to?
answered Nov 1, 2016 by Eduardo RS New to the Community (1 point)
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.
...