¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Software Upgrades


 

On Wed, Oct 25, 2017 at 7:27 PM, Victor Nagoryanskii <nagoryanskii@...> wrote:
Hi,

I found it very easy to program a chip using Raspberry Pi (or basically any Linux machine). I used?usbasp programmer (search on ebay), but technically you can hook up GPIO on Raspberry Pi directly to chip. Then (using usbasp):

$ sudo apt-get install?avrdude # install required software
$ sudo avrdude? -c usbasp -p m328p -U flash:r:flash.bin:r? ? ?# backup existing chip's firmware (will be saved to flash.bin file)
$ sudo avrdude? -c usbasp -p m328p -U flash:w:T1.00c.hex # write a new firmware to the chip

The "backup existing firmware" is pointless on the QCX, it will not be read out (or just 0xFF's) due to lockbits. The same goes for verify. The only one you need is the flash:w:xxx.hex.
Also not a good idea to hook it up straight to the RPi GPIO as it's 3.3V and the QCX is 5V, toasting the gpio pins in a jiffy. Powering it from the RPi at 3.3V might trip the BOD on the m328p, but might work because you're using the reset line when writing the flash.
Using a proper/cheapo programmer is the way to go if you want the results you're expecting.

Join [email protected] to automatically receive all group messages.