Avrdude Usb Serial Controller _BEST_
Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes./Users/christyyau/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/christyyau/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.usbmodem11201 -b115200 -D -Uflash:w:/var/folders/b3/y_g3drns0rn7hml6sn82s3jr0000gn/T/arduino_build_400066/sketch_sep09a.ino.hex:i
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega1284p -cstk500v1 -PCOM3 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m
C:\Users\karim\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\karim\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b115200 -D -Uflash:w:C:\Users\karim\AppData\Local\Temp\arduino_build_773560/Blink.ino.hex:i
To get a list of supported programmers, type in avrdude -c asdf (asdf is just some nonsense to get it to spit out the list of programmers) Here is my output, yours may vary a little. Don't bother memorizing it, just glance through the list.
To get a list of parts supported by avrdude, type in avrdude -c avrisp (it doesnt matter if you're not useing an avrisp programmer) without a part number into the command line. Don't memorize this list, just glance over it to get an idea of the chips that are supported.
Valid parts are: m6450 = ATMEGA6450 [C:\WinAVR\bin\avrdude.conf:10974] m3250 = ATMEGA3250 [C:\WinAVR\bin\avrdude.conf:10785] m645 = ATMEGA645 [C:\WinAVR\bin\avrdude.conf:10596] m325 = ATMEGA325 [C:\WinAVR\bin\avrdude.conf:10407] usb1287 = AT90USB1287 [C:\WinAVR\bin\avrdude.conf:10219] usb1286 = AT90USB1286 [C:\WinAVR\bin\avrdude.conf:10030] usb647 = AT90USB647 [C:\WinAVR\bin\avrdude.conf:9841] usb646 = AT90USB646 [C:\WinAVR\bin\avrdude.conf:9651] t84 = ATtiny84 [C:\WinAVR\bin\avrdude.conf:9468] t44 = ATtiny44 [C:\WinAVR\bin\avrdude.conf:9286] t24 = ATtiny24 [C:\WinAVR\bin\avrdude.conf:9104] m2561 = ATMEGA2561 [C:\WinAVR\bin\avrdude.conf:8911] m2560 = ATMEGA2560 [C:\WinAVR\bin\avrdude.conf:8718] m1281 = ATMEGA1281 [C:\WinAVR\bin\avrdude.conf:8530] m1280 = ATMEGA1280 [C:\WinAVR\bin\avrdude.conf:8341] m640 = ATMEGA640 [C:\WinAVR\bin\avrdude.conf:8153] t85 = ATtiny85 [C:\WinAVR\bin\avrdude.conf:7972] t45 = ATtiny45 [C:\WinAVR\bin\avrdude.conf:7793] t25 = ATtiny25 [C:\WinAVR\bin\avrdude.conf:7613] pwm3 = AT90PWM3 [C:\WinAVR\bin\avrdude.conf:7431] pwm2 = AT90PWM2 [C:\WinAVR\bin\avrdude.conf:7247] t2313 = ATtiny2313 [C:\WinAVR\bin\avrdude.conf:7060] m168 = ATMEGA168 [C:\WinAVR\bin\avrdude.conf:6872] m88 = ATMEGA88 [C:\WinAVR\bin\avrdude.conf:6686] m48 = ATMEGA48 [C:\WinAVR\bin\avrdude.conf:6499] t861 = ATTINY861 [C:\WinAVR\bin\avrdude.conf:6311] t461 = ATTINY461 [C:\WinAVR\bin\avrdude.conf:6122] t261 = ATTINY261 [C:\WinAVR\bin\avrdude.conf:5933] t26 = ATTINY26 [C:\WinAVR\bin\avrdude.conf:5776] m8535 = ATMEGA8535 [C:\WinAVR\bin\avrdude.conf:5618] m8515 = ATMEGA8515 [C:\WinAVR\bin\avrdude.conf:5460] m8 = ATMEGA8 [C:\WinAVR\bin\avrdude.conf:5300] m161 = ATMEGA161 [C:\WinAVR\bin\avrdude.conf:5160] m32 = ATMEGA32 [C:\WinAVR\bin\avrdude.conf:4985] m6490 = ATMEGA6490 [C:\WinAVR\bin\avrdude.conf:4792] m649 = ATMEGA649 [C:\WinAVR\bin\avrdude.conf:4607] m3290 = ATMEGA3290 [C:\WinAVR\bin\avrdude.conf:4424] m329 = ATMEGA329 [C:\WinAVR\bin\avrdude.conf:4239] m169 = ATMEGA169 [C:\WinAVR\bin\avrdude.conf:4059] m163 = ATMEGA163 [C:\WinAVR\bin\avrdude.conf:3916] m162 = ATMEGA162 [C:\WinAVR\bin\avrdude.conf:3720] m644 = ATMEGA644 [C:\WinAVR\bin\avrdude.conf:3530] m324 = ATMEGA324 [C:\WinAVR\bin\avrdude.conf:3338] m164 = ATMEGA164 [C:\WinAVR\bin\avrdude.conf:3146] m16 = ATMEGA16 [C:\WinAVR\bin\avrdude.conf:2968] c128 = AT90CAN128 [C:\WinAVR\bin\avrdude.conf:2777] m128 = ATMEGA128 [C:\WinAVR\bin\avrdude.conf:2599] m64 = ATMEGA64 [C:\WinAVR\bin\avrdude.conf:2418] m103 = ATMEGA103 [C:\WinAVR\bin\avrdude.conf:2278] 8535 = AT90S8535 [C:\WinAVR\bin\avrdude.conf:2157] 8515 = AT90S8515 [C:\WinAVR\bin\avrdude.conf:2043] 4434 = AT90S4434 [C:\WinAVR\bin\avrdude.conf:1960] 4433 = AT90S4433 [C:\WinAVR\bin\avrdude.conf:1836] 2343 = AT90S2343 [C:\WinAVR\bin\avrdude.conf:1712] 2333 = AT90S2333 [C:\WinAVR\bin\avrdude.conf:1627] 2313 = AT90S2313 [C:\WinAVR\bin\avrdude.conf:1514] 4414 = AT90S4414 [C:\WinAVR\bin\avrdude.conf:1401] 1200 = AT90S1200 [C:\WinAVR\bin\avrdude.conf:1286] t15 = ATtiny15 [C:\WinAVR\bin\avrdude.conf:1153] t13 = ATtiny13 [C:\WinAVR\bin\avrdude.conf:980] t12 = ATtiny12 [C:\WinAVR\bin\avrdude.conf:847] t11 = ATtiny11 [C:\WinAVR\bin\avrdude.conf:783]
This switch tells avrdude where to look for your programmer. If you are using a USB connected device, you can just use -P usb or, leave it out. The programmer automatically knows when the programmer is a USB device.
If you are using a parallel port or serial port programmer, you should use this option to indicate what port the programmer is connected to. 99% of the time its lpt1 (parallel) or com1 (serial) but you can always check it by looking under the Device Manager. Open the System Properties control panel
This means that the programmer couldn't talk to the chip. If you are using a "simple" programmer such as a serial or parallel port bitbang programmer, it could mean the programmer is at fault. Otherwise, it usually means the programmer is OK but it couldnt find the chip.
You'll see that it stops at step 2, once the signature is different than the expected one it stops. This is because code that is compiled for an attiny2313 wont run on an atmega8 (this is true of most microcontrollers, the .hex files are not cross compatible)
There are a few variants of the CH340. The CH340G requires an external crystal oscillator to function while the CH340C includes a built-in crystal oscillator. However, both function in the same fashion - they convert USB data for a serial UART and vice versa!
Connect the CH340 to your computer's USB port. Click on somewhere else on the screen for the menu to refresh itself. Then head back to the menu by clicking on Tools > Port. A new COM port should pop up. By process of elimination, the CH340 should have enumerated to the new COM port! Feel free to click on the COM port to select if you are uploading code to a microcontroller. Depending on your computer, the COM port may show a different number.
You can also verify if the USB-to-serial converter is working by doing a serial loop back test or echo test. If you are using the breakout board, you can add a jumper between the Tx and Rx to try and echo a character in a terminal program. For more information, try checking out the Hardware Test for the serial basic hookup guide.
If you have found the file in the path, you will need to run each of the following commands in the CLI/Terminal to remove old CH340 drivers. In this case, there was only the usbserial.kext file but it does not hurt to run both commands. Make sure to have administrative privileges to ensure that the drivers are removed.
Check if the old drivers were removed in the paths by using the ls command with your respective OS version. You will notice that the *.kext file is removed from the respective paths. In this case, the usbserial.kext was removed from Mac OSX High Sierra.
Connect the CH340 to one of your Mac's COM ports. Check for the following changes (your board may show up under a different device name). The CH340 should show up as /dev/cu.wchusbserial*****. Depending on your computer, the COM port may show up as a different number.
There are some reported cases of serial communication failure when using the factory drivers in Linux. If you encounter this problem, you can try installing patched drivers as explained in this forum post. Here are the steps (to run in the command line):
Depending on your root permissions, you may need to configure the serial port with the following two commands. Make sure to adjust the $username with respect to the user ID that is currently logged in.
Alternatively, if you have the Arduino IDE installed, you should also see a change in the number of available COM Ports (you may need to restart the Arduino IDE for the board to populate). Without the CH340 connected to your computer, click on Tools > Port. Depending on the Linux flavor that you have, the Ports may not open to display any serial ports. Take note of the Serial Ports available if it opens up. 2b1af7f3a8