Don't throw away those CH340 USB-Serial just yet!

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Don't throw away those CH340 USB-Serial just yet!

Postby eventhorizon » Mon Dec 24, 2012 12:30 am

I bought this CH340 based USB to Serial adapter in the past hoping that I would be able to program using my netbook. The thing is, it doesn't work with serial programmers, and it never will. I am using an ATMEGA8, and flashed in a UART Bootloader, then changed the BOOTRST so that it will run the bootloader on power-up. After that, I connected the ATMEGA8's TX/RX pins to the !RX/!TX (*note the "!") pins of the CH340 adapter. I downloaded and ran a GUI version of FBoot, then powered up my mega8 (yes, in that order, or simply reset the mega8 if it's already turned on after running FBoot.) , and it flashed successfully.

The reason for the !RX/!TX is that the CH340 is not RS-232. It is actually a USB-to-TTL, and the outputs (and inputs) are inverted. I simply used a 74LS04 to invert the signals. That's it! I can now use my netbook to do some AVR programming without more expensive programmer (or and arduino in some cases).
-----------------------------------------------------------------------------------------------
Out of one hole, and into another.
eventhorizon
 
Posts: 114
Joined: Tue Jan 25, 2011 5:09 pm
Location: Quezon City, Philippines

Return to Microcontrollers

Who is online

Users browsing this forum: No registered users and 4 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [114]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]