Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
interfaces:ch340g [2017/01/11 20:11] – external edit 127.0.0.1 | interfaces:ch340g [2021/08/11 11:08] (current) – [Resources] darron | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== Nanjing QinHeng Electronics CH340 ==== | ==== Nanjing QinHeng Electronics CH340 ==== | ||
<wrap right> | <wrap right> | ||
- | {{: | + | {{: |
\\ \\ | \\ \\ | ||
- | {{: | + | {{: |
- | \\ \\ | + | |
- | {{: | + | |
</ | </ | ||
Line 11: | Line 9: | ||
These devices are becoming popular, so much so that fake ch340 chips exist. | These devices are becoming popular, so much so that fake ch340 chips exist. | ||
- | The fakes have the ch340 USB identity | + | The fakes have the ch340 USB identity |
+ | (see below). | ||
+ | |||
+ | As well as being found on general purpose serial interfaces they are | ||
+ | often found on Arduino clones and ESP8266 bridges. | ||
=== Pinout === | === Pinout === | ||
Line 29: | Line 31: | ||
+------+ | +------+ | ||
</ | </ | ||
+ | |||
=== Linux === | === Linux === | ||
+ | <wrap right> | ||
+ | {{: | ||
+ | </ | ||
== Identity == | == Identity == | ||
Line 50: | Line 56: | ||
/ | / | ||
</ | </ | ||
- | udev by-id is not supported by Pickle Microchip PIC ICSP. | + | |
=== Pickle Microchip PIC ICSP === | === Pickle Microchip PIC ICSP === | ||
+ | <wrap right> | ||
+ | {{: | ||
+ | </ | ||
+ | |||
+ | Pickle ICSP supports RS232 for programming boards such as the Velleman K8048 kit. | ||
== Velleman K8048 Configuration == | == Velleman K8048 Configuration == | ||
+ | |||
+ | The K8048 kit has an RS232 interface which is used in a bit-bang mode of operation. USB UARTS | ||
+ | are not ideal for this purpose but can operate, albeit slowly. | ||
+ | |||
+ | The .pickle configuration for the CH340 is this. | ||
< | < | ||
- | DEVICE=/ | + | DEVICE=TTY |
+ | IFACE=/ | ||
SLEEP=600 | SLEEP=600 | ||
BITRULES=0x001F | BITRULES=0x001F | ||
</ | </ | ||
+ | |||
+ | The SLEEP value affects both the speed of programming and the reliability of operation. | ||
=== RS485 === | === RS485 === | ||
<wrap right> | <wrap right> | ||
- | {{: | + | {{: |
+ | \\ \\ | ||
+ | {{: | ||
</ | </ | ||
Cheap RS485 adapters exist using both this chip and a fake version of this chip. | Cheap RS485 adapters exist using both this chip and a fake version of this chip. | ||
- | The real chip is a CH340G with 16 pins and the fake chip has 24 pins in an unmarked package. The top 20 pins of the fake match those of a genuine CH340R or CH340T device which is only available | + | The real chip is a CH340G with 16 pins and the fake chip has 24 pins in an unmarked package. The top 20 pins of the fake match those of a genuine CH340R or CH340T device which is only available |
The RS485 I/O stage varies slightly between the real and fake adapters and is constructed like this for the CH340G device. | The RS485 I/O stage varies slightly between the real and fake adapters and is constructed like this for the CH340G device. | ||
Line 75: | Line 96: | ||
=== Resources === | === Resources === | ||
- | [[http:// | ||
- | [[http:// | ||
+ | [[http:// | ||
+ | [[http:// |