XModem / UART problem - Page 1
Forum section: electronics / general

author: Wawavoun
author_rank: Regular Contributor
timestamp: March 07, 2025, 04:43:45 pm
content: Hi All,I try to debug a problem of data transmission with XModem.On one side there is a Linux + Minicom + sx computer with usb to rs232 interface. On the other side a Motorola 68008 8 MHz board with a TL16C750 + Max232.Basically the console works well at 115200 bauds 8N1 with rts/cts enabled. I never see a problem.But in this case only few datas are send to the Mini-68K and at very slow rate (keyboard input).Note that I have to connect rts cts. Minicom never send what I type in on the keyboard but, on the other direction, strangely the board send his datas even without rts cts connected.May be a first sign that something is wrong somewhere...I need to find a way to transfer files from my Linux computer. Usually I use XModem.I have a 68K program doing that and checked in both direction on an other board.The problem start here. At 115200 bauds no way to transfer even one packet.I decrease the speed to 1200 bauds and things start to work but they are still some retries.I connect a logic analyzer to the serial line and found that the bytes of one packet are sent in burst mode without any pauseand that rts coming from the board stay always low...I dont have a great experience on serial port.I have think that as soon as a byte is received rts should change until this byte has been read by the cpu.Looking at the timing between two bytes I doubt that the receiver cpu can got the byte, store it into the buffer and come back to read the next and also eventually check a timeout during this time.May be this explain why when I decrease the speed things go better ?I have double checked the wiring, jumpers settings and connections. Everything look good.The problem is into the 16C750 and may be into his configuration. It seems rts / cts are fully ignored.In fact in any direction rts/cts from - to the board seems to be ignored.The datasheet is quite complex, some registers are interlocked and lack init / configuration examples.Is anybody able to help or have some example for init this chip ?Thanks.Philippe

author: Kean
author_rank: Unknown
timestamp: March 07, 2025, 05:11:01 pm
content: As you are sending to the 68008 which isn't keeping up, you will need to have the 16C750 UART configuration code enable the FIFOs and Auto-RTS mode so that it controls RTS signal based on the receiver FIFO space threshold.You might need to look at the 16C550 datasheet for info on the control registers to set the correct configuration, and see what your existing code is doing. At least the '750 part has 64-byte FIFOs vs the 16-byte FIFOs in the '550, and no FIFOs in the '450.

author: Wawavoun
author_rank: Regular Contributor
timestamp: March 07, 2025, 08:55:17 pm
content: Not working rts/cts is the problem.I have find a solution : put $22 into MCR register to enable autoflow then rts/cts come alive and XModem works.

author: Kean
author_rank: Unknown
timestamp: March 08, 2025, 08:07:13 am
content: Quote from: Wawavoun on March 07, 2025, 08:55:17 pmGreat!I wasn't sure if you'd be able to modify the code easily, and I didn't want to dig too far into the register settings to work it out for you... partly being lazy, but also in case you needed to learn the control registers yourself for further experimentation. It has been a long time since I wrote my own code for the 16C550.