Page 1 of 2

Help with USBASP

Posted: 12 Nov 2019, 14:37
by MelD
Hello,
Finally took the plunge and ordered some of the latest 328 boards from the Ebay vendor PhilG recommended. I also ordered a Sparkfun USBASP programmer from Amazon. Now to program them. Can someone please give me a caveman explanation on how to take the code from Phil G’s site and stuff it into the Ebay boards? Like 1. Do exactly this. 2. Do exactly that, etc. I don’t see any issue with the hardware installation of the board. I am just not very software literate. Can you help?

Thx,
Mel Duval

Re: Help with USBASP

Posted: 12 Nov 2019, 16:14
by Phil_G
Hi Mel, welcome aboard
First you'll need to get the Arduino IDE installed, thats easy, just like any other program:
https://www.arduino.cc/en/Main/Software
Choose the top option, 'Windows Installer'
Then you need a driver for the USBASP, and the easiest way by far is to use Zadig to install it:
http://zadig.akeo.ie
Then load up the sketch and make any amendments you need such as channel order, on the Reeduino set the 'activetoggles' variable, etc. If you're not 100% sure of the software then dont change anything else yet.
Then plug the USBASP onto the ICSP header (actually we dont generally install that header - just wedge the 6 pins in for programming) and from the menu select 'upload using programmer' (NOT the upload button!)
It will take a few seconds to compile, then a few more to upload. It will tell you when its done.
Thats it, test the programmed board and then wire it up.
Beware that the ICSP header isnt polarized and ought not to be reversed - though I have without damage.
Cheers
Phil

Re: Help with USBASP

Posted: 12 Nov 2019, 17:06
by drigotti
You should also ignore the error message after the upload is complete..No?

Re: Help with USBASP

Posted: 14 Nov 2019, 03:31
by MelD
Thank you. Will try it out this weekend I got the IDE installed so all is left is the hardware.
later!
Mel D.

Re: Help with USBASP

Posted: 15 Nov 2019, 02:42
by Scott Todd
Mel is an Engineer. I don't buy this mumbo jumbo he can't do software ;)

I drive a Mac and always had trouble with those USBASP programmers. Occasionally they would work but mostly not. I started soldering the headers onto the board for reliability. I often flash the sketch many times as I change things in it and its just easier if the pins are soldered in. Its only a few minutes more...

I started using an Arduino as the programmer and never looked back. It ALWAYS works! I have one dedicated with the correct wiring going to the IDE header.

Mel, call me if you have troubles. I'm happy to help

Error messages indicate a problem. Sometimes they work but you should find out whats wrong.

Scott

Re: Help with USBASP

Posted: 15 Nov 2019, 19:21
by drigotti
Here is the error I was told to ignore.....

Martin/all,
Installed the drivers. I programmed a nano with "blink". It worked!...Except I get an error message about "cannot set sck period" BUT it still blinked....

Re: Help with USBASP

Posted: 16 Nov 2019, 20:35
by drigotti
Actually I've been told this is just a warning, NOT an error.
drigotti wrote: 15 Nov 2019, 19:21 Here is the error I was told to ignore.....

Martin/all,
Installed the drivers. I programmed a nano with "blink". It worked!...Except I get an error message about "cannot set sck period" BUT it still blinked....

Re: Help with USBASP

Posted: 01 Dec 2019, 18:49
by MelD
Scott Todd wrote: 15 Nov 2019, 02:42 Mel is an Engineer. I don't buy this mumbo jumbo he can't do software ;)

I drive a Mac and always had trouble with those USBASP programmers. Occasionally they would work but mostly not. I started soldering the headers onto the board for reliability. I often flash the sketch many times as I change things in it and its just easier if the pins are soldered in. Its only a few minutes more...

I started using an Arduino as the programmer and never looked back. It ALWAYS works! I have one dedicated with the correct wiring going to the IDE header.

Mel, call me if you have troubles. I'm happy to help

Error messages indicate a problem. Sometimes they work but you should find out whats wrong.

Scott
Well, you are right, I can do software if I have to. 😃 But it always takes me a lot longer than it should 😁😁😁. I am an old analog hardware guy. THAT I can do. When I started electronics they taught us tubes. Those glass things with a vacuum that ran on high voltages that could bite you pretty good. (We don’t need to go into why I know that....). Then these fancy things called transistors and REALLY fancy things called ICs came along. I went into engineering management for 20 years and holy cow what a change when I got finally back to dealing with hardware. So I have been catching up for a while now on paper dealing with design safety someone else’s designs. Now it is time for me to get into the 1’s and 0’s........

Re: Help with USBASP

Posted: 05 Dec 2019, 22:38
by bluejets
MelD wrote: 12 Nov 2019, 14:37 Hello,
Finally took the plunge and ordered some of the latest 328 boards from the Ebay vendor PhilG recommended. I also ordered a Sparkfun USBASP programmer from Amazon. Now to program them. Can someone please give me a caveman explanation on how to take the code from Phil G’s site and stuff it into the Ebay boards? Like 1. Do exactly this. 2. Do exactly that, etc. I don’t see any issue with the hardware installation of the board. I am just not very software literate. Can you help?

Thx,
Mel Duval
Don't know which usbasp you have or which arduino but I looked up the amazon usbasp as you quoted (didn't know where to find your link)
One needs to take care with the programming voltage jumper which can be set either to 5v or 3v3 depending on which arduino you are using.

Re: Help with USBASP

Posted: 30 Oct 2021, 00:08
by RogerMacey
Hi Guys. I'm looking for some help please, if you can, with some USBASP programming problems.
Having successfully completed two scratch built single channel look-alike transmitters (RCS and MacGregor), and converted a Horizon 2-channel transmitter to 2.4GHz, all using encoders supplied by Phil Green (Thank You Phil), I thought I'd have a go at producing my own encoders for my next projects.

I sourced a couple of DIY MORE Pro Mini Strong boards, and a USBASP board and 10 to 6 pin adapter, from "chips-fans" on eBay.
The Pro Mini boards are, as far as I'm aware, 5V 16M (the screen printing on the boards only shows 5V, and the crystal has 16.000 on it's case).
I checked the boards for any shorts to ground as advised, and removed the schottky diode and added the 5V link, also as advised by Phil.
The USBASP board has a 3.3 or 5V jumper (JP1 ?), set to 5V. It also has two more jumper positions (JP2 and JP3) but there are no header pins, so likely unused ? The crystal appears to be 12.000 MHz. I'm wondering if this latter item may be a culprit ? The board pictures are shown at the end.

Just for background information, I had already installed the Arduino IDE, and used it successfully to program a couple of Arduino Nano V.3 boards, one of which has gone into a PPM / PWM Tester / Analyser (Thanks again Phil) which works brilliantly, and another into a text-to-speech project, which also works. The Nano boards were programmed using a USB to USB cable, on COM7, with Board: set to Arduino Nano, Processor: set to ATmega328P (5V, 16MHz), and Programmer: set to AVRISP mkII, and the standard Upload function.

Now I came to using the USBASP device to program the Pro Mini Strong boards. The USBASP device was plugged into the same USB port as previously used for the USB to USB Nano cable, with Board: set to Arduino Pro or Pro Mini, Processor: set to ATmega328P (5V, 16MHz), and Programmer: set to USBasp, and the Upload Using Programmer function.

After falling at the first hurdle, I started to search the forum for possible solutions. I checked or tried everything that I found, but the most significant seemed to be an incorrect USB driver, so I went to the Zadig site, and installed from there the WinUSB(v6.1.7600.16385) driver.

Even so, when trying to Upload Using Programmer, I get the following error messages:
avrdude: warning: cannot set sck period. please check for usbasp firmware update. (I understand that this one doesn't matter ?)
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
the selected serial port
does not exist or your board is not connected

If I try Burn Bootloader, I get the following error messages:
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Error while burning bootloader.

Besides selecting the "correct" Board:, Processor: and Programmer: settings, I have tried all the others in the dropdowns as well, but to no avail.

Whichever option I try, the following is always displayed at the bottom right of the screen:
Arduino Pro or Pro Mini, ATmega328P (5V, 16MHz) on COM7

but the USBASP device shouldn't use a COM port at all, being a USB and not a straight serial device ?

I get the same results with both Pro Mini Strong boards. The Power LEDs are illuminated on both the USBASP device and the Pro Mini Strong boards.

I have even uninstalled the Arduino IDE, and reinstalled it, but made no difference.

I have also tried all 3 of the USB drivers listed on the Zadig site.

I have also tried the other USB port on my laptop (which runs Windows 7 Ultimate SP 1).

I'm beginning to think that the USBASP board may be faulty ? Or have I missed something stupid ?

Thank you for reading this far. I've tried to include as much in formation as possible.

Any help that you may be able to offer would be much appreciated.

Thank you, Roger.