My board design with a FTDI chip is a lot slower than a generic off the shelf RS232 to USB cable. Why is that the case?

别来无恙 提交于 2019-12-25 18:22:10

问题


Hello People of the internet,

The company I work at implement hardware that is using RS232 however the board uses a network cable instead of a standard DB9 RS232 connector. So to remove the custom cable they need to mufacture for customers I designed a simple RS232 to USB converter that has a USB on the one side and a network cable on the other. It uses the FT230X chip from FTDI and a standard serial to rs232 converter from ST. However after doing some tests it seems that when I run my configuration program it now takes significantly longer to send and receive data. A test showed with a standard RS232 to USB cable converter sending and receiving data took 6 seconds and with my new deign the same process took 16 seconds.

Anyone know how this can be? It's important to mention that every single byte sent requires an acknowledge byte to be sent back i.e. it's always 1 byte RX 1 byte TX repeat.


回答1:


FTDI chips transfer data if internal intermediate 64-byte buffer (62 user bytes) is full or if latency timer expires (there are another to conditions which are not applicable in yours case, see AN232B-04, part 3. Buffers and the Latency Timer).

When device is powered, this timer is set to 16 ms by default. In your case it means that you waste 16 ms per transaction. You need to set this timer to lower values, see the application note.

p.s. The company I work for uses on-the-shelf USB to RS232 converters with RJ-45 jack. One can search it by "FTDI USB RS232 to RJ45 cable" keywords. Anyway from my point of view it is better to use line-oriented or packet-oriented protocol and properly setup EVENT CHARACTER option for given serial port.



来源:https://stackoverflow.com/questions/54788387/my-board-design-with-a-ftdi-chip-is-a-lot-slower-than-a-generic-off-the-shelf-rs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!