Pomalost serioveho portu z USB (FTDI apod.)

Jirka zaloha na volny.cz
Sobota Leden 19 22:49:12 CET 2013


Už víckrát se tu probírala "vývojem" PC vyvolaná situace spočívající v 
realizaci sériového portu pomocí USB převodníku a s tím spojené možné 
problémy.

V této souvislosti upozorňuji na jednu konstrukci programátoru, kde se 
pěkně vysvětluje, proč může být sériový port přes USB tak pomalý:

http://digital-force.net/projects/pic_programmer/

Cituji:

**********************************************************************
Known Odds

The only problem that appeared so far is a rather slow programming 
speed. While the programming of some test-system with a certain 
test-code and a native RS232 interface took just a fraction of a second, 
it took around 2 minutes when using the USB-controlled programmer. Under 
Windows (using IC-Prog) the situation is even more worse.

Meanwhile, the reason for this slow speed has been figured out. 
Unfortunately, it is not a driver or configuration problem as initially 
suspected. Rather it is an inherent "feature" of USB. The problem is 
that the nature of USB introduces latencies of at least 1ms. Because the 
JDM programmer's serial data transmission is based on switching the 
RS232 signals RTS and DTR, each toggling of these lines requires one USB 
transaction. And every USB transaction brings along a delay of at least 
1ms (in practice, I measured around 1.4ms in best case). In order to get 
an idea about the relations, the same operation with a natural UART on 
the same machine takes just 2 micro seconds - that is 700 times faster.

The only solution to fight with this issue is to off-load the actual 
programming task to a small external micro controller that is controlled 
via USB.
**********************************************************************

---
Jirka


Další informace o konferenci Hw-list