USB AVR программатор

Hello everyone, I recently joined the project. I use MacOs.
For quite some time I can’t fix the problem with USB programmers. USBasp and AVRMKII not one of them does not appear in the lists of devices. However, the usual adapter on ch340 appears in the list of devices.

I don’t think these programmers have a serial interface. They’re just meant to program AVR chips. Do you want to use them as a USB-serial adapter or are you having problems programming your target chip?

1 Like

I program AVR on “C”, and try to load the program into the flash memory of ATmega328. Used CrossPack for AVR before, and everything worked perfectly.

Again same question, do you want to use these programmers as a USB-Serial adapter (which to the best of my knowledge doesn’t work without severe modifications) or can’t you program your target chip?

For configuring PlatformIO with e.g. the USBasp, see the flags in the documentation and execute the “Upload using Programmer” task in VSCode.

2 Likes

USPasp / AVRMKII == In-System Programmer (ISP)

CH340 == USB to UART / serial adapter

ISPs like USBasps are made with the minimum of parts to do just that job and keep the price down, so can’t be used as serial adapters, without modification and new firmware.

Note that if you use ISP programming, the serial programming bootloader may be missing, meaning you need to burn the bootloader again before you can do serial programming.

I run OS-X High Sierra 10.13.6 and have been experimenting with USBasploader, the three resistor two zener USB interface which needs a USBasp bootloader burnt into the target chip via the usual six pin ICSP program header.

I think you’re trying to use a standalone USBasp programmer which connects to the six pin ICSP header which doesn’t need a bootloader on the target chip.Despite the differences the setup should be the same.

I see the same “USBasp” as you do under the device tree.

When USBasp is found “sudo dmesg” in a terminal shows:

002108.310806 AppleUSBHostResources@: AppleUSBHostResources::allocateDownstreamBusCurrentGated: assuming successful wakeUnits 100 sleepUnits 0

In platform.ini I have:

upload_protocol=usbasp-clone -p m2560 -B 1 -v

Obviously programming a 2560, you might need usbasp-clone or usbasp.

Outside of platformio avrdude command is

avrdude -v -c usbasp-clone -p m2560 -P usb -U flash:w:file.hex:i

There are many versions of USBasploader around, I’ve tried several with mixed results. Some will program 328 chips but not 2560s, some are discovered as high speed usb devices and don’t connect. Some work with some Linux version some not. If you are using a standalone USB asp programmer it will be running some version of the bootloader code so I would think it would have similar problems.

Hope this is of some help.

(Note for prospective off topic comments: I’m across the >64k flash limit and avrdude v6.3 requirement)