Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
interfaces:ch340g [2017/01/11 20:22] – external edit 127.0.0.1interfaces: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>
-{{:interfaces:ch340usb.jpg?200}}+{{:interfaces:ch340usb.jpg?150}} 
 +\\ \\ 
 +{{:interfaces:ch340-min.jpg?150}}
 </wrap> </wrap>
  
Line 32: Line 34:
 === Linux === === Linux ===
 <wrap right> <wrap right>
-{{:interfaces:ch340-esp.jpg?200}}+{{:interfaces:ch340-esp.jpg?200|ESP8266 bridge}}
 </wrap> </wrap>
  
Line 54: Line 56:
 /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0 /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0
 </code> </code>
-udev by-id is not supported by Pickle Microchip PIC ICSP.+
  
 === Pickle Microchip PIC ICSP === === Pickle Microchip PIC ICSP ===
Line 61: Line 63:
 </wrap> </wrap>
  
 +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.
 <code> <code>
-DEVICE=/dev/ttyUSB0+DEVICE=TTY 
 +IFACE=/dev/ttyUSB0
 SLEEP=600 SLEEP=600
 BITRULES=0x001F BITRULES=0x001F
 </code> </code>
 +
 +The SLEEP value affects both the speed of programming and the reliability of operation.
  
 === RS485 === === RS485 ===
 <wrap right> <wrap right>
-{{:interfaces:ch340-485.jpg?200}}+{{:interfaces:ch340-485.jpg?150}}
 \\ \\ \\ \\
-{{:interfaces:ch340g-fake.jpg?200|Top: ch340g Bottom: fake}}+{{:interfaces:ch340g-fake.jpg?150|Top: ch340g Bottom: fake}}
 </wrap> </wrap>
  
 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 as a 20-pin SSOP.+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 in 20-pin packages.
  
 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 85: Line 96:
  
 === Resources === === Resources ===
-[[http://www.wch-ic.com/product/usb/ch340.asp|CH340 product page]]\\ 
-[[http://www.wch.cn/downloads/downfile.php?id=65|Driver for Cygwin]] 
  
 +[[http://www.wch-ic.com/download/CH340DS1_PDF.html|Data-sheet]]
 +
 +[[http://www.wch-ic.com/downloads/CH341SER_EXE.html|Windows driver]]