Author Topic: CP2102 maximum DTR / RTS / BREAK speed ?  (Read 2221 times)

0 Members and 1 Guest are viewing this topic.

Offline JaunedeauTopic starter

  • Regular Contributor
  • *
  • Posts: 100
CP2102 maximum DTR / RTS / BREAK speed ?
« on: April 27, 2015, 08:06:11 pm »
Hi,

  I am making my own pic programming software (only as a learning exercise). I bought an usb to ttl adapter. Unfortunately, I did not know that CLP2104 could be used as real gpio and ordered a CLP2102 (CLP2104 is ordered from china but will take 3-4 weeks to get there).

  I made some tests using the CLP2102 as a com port using RXTX from java, or "directly" in C#, and if I toggle DTR and rts from 0 to 1 and then 1 to 0 (4 bits changes), I can reach the speed of 14 iterations per second. By optimizing things (toggling data only if needed) I can reach about 20 bit per second. The same code run 100+ times faster if I user my desktop's motherboard's uart.

  Trying so send break is even slower than toggling rts/dtr

  Can the CP2102 be switched faster by using the USBXpress and/or C code ? And the CP2104 (using GPIO mode) ?

Thanks you,
John.
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
Re: CP2102 maximum DTR / RTS / BREAK speed ?
« Reply #1 on: April 28, 2015, 01:32:34 am »
I assume "20 bit per second" is 20Hz. I use a little USB to rs232 TTL board using the CP2102 and it works fine at 115200 baud, not toggling RTS etc. though. But that implies that the handshaking if enabled would work well into the multi kHz range. The speed problem is on the PC/Programming side.
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9228
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: CP2102 maximum DTR / RTS / BREAK speed ?
« Reply #3 on: April 28, 2015, 07:04:31 am »
Have you tried plugging the USB-RS232 into a USB 2.0 (or 3.0) hub instead of directly into a PC? I once discovered that due to some strange quirk, it greatly accelerated bit banging.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf