CH340 TTL to Serial for programming

Questions on UARTs, and serial communication
HalfNormal
Posts: 4
Joined: Mon May 15, 2017 3:47 pm

CH340 TTL to Serial for programming

Postby HalfNormal » Mon May 15, 2017 3:56 pm

I purchased a few of the PROstart boards and I am trying to communicate with them. I have CH340 boards that I use with Arduinos but I am not having any luck with the PROstart. Due to the issues with the genuine FTDI chips, I now only use the CH340. Will I have to find a FTDI programming dongle? The CH340 board only has TXD and RXD out. Do I need DTR?
Thanks!

basicchip
Posts: 759
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: CH340 TTL to Serial for programming

Postby basicchip » Mon May 15, 2017 8:17 pm

For BASIC you only need RESET. For C you can either short the programming pin yourself or get one of our dongles which does that with the other control pin. Details in the help files.

I have not tried the CH340 boards, but have had luck with the $10 FTDI boards on eBay, but some of the $3 "FTDI" boards do have the driver issue. There are work arounds that you can find on the web (I can't publish them as I have to respect their IP). I have not bought any in a year or 2. SparkFun should also be a source for USB dongles.

Since we build so few of the dongles they are expensive from us at--

http://www.coridiumcorp.com/catalog/pro ... ucts_id=83

HalfNormal
Posts: 4
Joined: Mon May 15, 2017 3:47 pm

Re: CH340 TTL to Serial for programming

Postby HalfNormal » Tue May 16, 2017 1:34 am

After doing some more reading on the site and the forums it seems that the BASIC software looks for the FTDI driver. I have an USB to 9 PIN RS232 converter that is not recognized either.

So as not to waste any more time, I did purchase a programming dongle from the site. Yes it more expensive but it will work out of the box and I do not mind supporting the cause.

Thanks,
Larry

basicchip
Posts: 759
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: CH340 TTL to Serial for programming

Postby basicchip » Tue May 16, 2017 3:05 am

BASICtools is looking for FTDI, mbed or Teensy serial ports. But it should see the CH340 as a com port, all lower case. The question is which com port it is, normally the PC reserves 1-3 for internal devices, but I could be wrong.

According to the schematic I looked at, the CH340 should drive DTR to reset, through a large cap. That should actually work with Coridium boards. The required connections are GND, RXD, TXD, that DTR reset, and power from somewhere, typically 5V from USB.

HalfNormal
Posts: 4
Joined: Mon May 15, 2017 3:47 pm

Re: CH340 TTL to Serial for programming

Postby HalfNormal » Tue May 16, 2017 7:23 pm

The CH340 boards are showing as com3. The ones I have do not have a DTR signal out. I am sure I could hack the board but will do so at another time. I will use the FTDI board for now and keep it simple.

HalfNormal
Posts: 4
Joined: Mon May 15, 2017 3:47 pm

Re: CH340 TTL to Serial for programming

Postby HalfNormal » Thu May 18, 2017 10:19 pm

Received the FTDI board today and it worked like a charm. Loaded a few examples without an issue. Now on to the hard stuff!

Just for giggles I tried the CH340 again for comparison. It connects but no matter what the baud is set to, it spits out garbage. No wonder it does not know it is connected. I will let you know what I find out when I have time to troubleshoot the issue.

Thanks for the quick shipping!

basicchip
Posts: 759
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: CH340 TTL to Serial for programming

Postby basicchip » Fri Jun 09, 2017 1:11 am

I ordered a couple of these and they came in today. I changed the connector from male to female, plugged it in, updated the driver from the web.
ch340.jpg
ch340.jpg (16.38 KiB) Viewed 857 times

And it works fine with BASIC. I have no idea how they can make these and sell them for $1.66.


Return to “Serial Communication”

Who is online

Users browsing this forum: No registered users and 1 guest