Help with USBASP

Arduino projects on the go
RogerMacey
Posts: 12
Joined: 13 Nov 2020, 20:47

Re: Help with USBASP

Post by RogerMacey »

Hi again. For some reason the board pictures weren't included in my previous plea for help ! Hopefully they will work this time ! Thanks, Roger.

Image
RogerMacey
Posts: 12
Joined: 13 Nov 2020, 20:47

Re: Help with USBASP

Post by RogerMacey »

Hi All.
After a lot more checking, I finally discovered that the 10 pin IDC plug on the far end of the 10 way ribbon cable was on back to front !
When the signals had then gone through the 10 pin to 6 pin ICSP converter boards:
. MISO and GND were reversed
. SCK and MOSI were reversed
. RST and VCC were reversed.
To rectify this, I cut the moulded locator from the 10 way IDC plug on the far end of the 10 way ribbon cable, and pushed it into the 10 way socket on the ICSP converter board, the other way round.
Fortunately neither of the Pro Mini Strong boards seem to have been damaged by this, and I have now successfully loaded sketches to them and run them.
Martin
Posts: 779
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Help with USBASP

Post by Martin »

Hi Roger,

Well done on fixing the problem. :D
12MHz crystal on the USBasp is normal.

The two unpopulated jumpers:
  • one of them (usually the one nearest the ribbon connector) is sometimes useful: when fitted, it makes the USBasp work much more slowly than normal - this is sometimes useful when the target Arduino has been set in to some low power slow mode, and the standard rate is then too fast for it. If you find your USBasp communicates okay with most Arduinos, but one doesn't work, try fitting that jumper while 'burning bootloader' - this sets the Arduino back to running at normal speed, and it can then often be programmed normally, the jumper then no longer being required.
  • the other jumper is fitted if you want to update the firmware on the USBasp itself. This isn't normally necessary. If you ever need to do it, fit the jumper and don't connect to an Arduino while performing the firmware update. You can find the USBasp firmware here.
I still can't see your attached photos. I suspect the google images thing only works with the appropriate google log-in. So you can probably see them, but everyone else just sees a sort of greyed out stop sign. Easy way is to resize the photo to something reasonable using one of the free on-line resizing tools, such as this one. I'd resize to maybe 1024 wide or 768 high, whichever is larger, and then use the attachments tab when posting to upload the resized smaller photo to the Mode Zero server.
RogerMacey
Posts: 12
Joined: 13 Nov 2020, 20:47

Re: Help with USBASP

Post by RogerMacey »

Hi Martin.
Many thanks for your reply, and all the information about the USBasp jumpers and firmware, also the link to the photo resizing software.
I've now started to dismantle an old Futaba M Series 6 channel transmitter, which will get a thorough refurb before being fitted with an encoder containing Phil Green's 7 channel sketch (Thank You Phil), and a FrSky XHT RF Module. I will post some details, and hopefully some photos that can be seen, as the project progresses.
Thanks again, and take care.
Roger.
ncpiperpilot
Posts: 18
Joined: 13 Jul 2022, 21:05

Re: Help with USBASP

Post by ncpiperpilot »

Hi,
Posting in this old thread as it seems like the right place. Phil_g pointed me here to get the zadig driver installer.

The background. I'm a newby programming the Arduino boards. I do have an Arduino dev kit that I have used to start learning the code. At least I know the IDE 2.3.2 installed previously is working.

I bought this USBASP programmer from Amazon:
KeeYees 2pcs Downloader Programmer for USBASP for ISP with Cable and 10Pin to 6Pin Adapter Board for 51 for AVR Series Microcontroller https://a.co/d/2lSu0Jy

Used zadig to install the driver. Loaded up the IDE with Phil's GG Sketch. Connected the USBASP board into my PC. Set the IDE to "Arduino Pro or Pro mini" on com3. Connected to the DIYMore Pro Mini Strong board (which had previously programmed with the GG code, but not by me as I wanted to insure it had the latest code). It had been working but A6 and A7 pots didn't adjust throw when installedin my Tx. Selected "upload via Programmer". The IDE status in the lower right says "Arduino Pro or Pro Mini on COM3". Code compiles ok, the goes into "uploading..." mode but doesn't seem to complete. Tried it once yesterday, let it sit 4 hours. Rebooted this morning, Tried it again, same result. I did verify the 5v and Gnd at the 6 pin was correct (also made sure the USBASP board had the jumper ser to 5v). I did just insert the pins in the pcb holes as Phil had recommended.

With that long story, not sure what's going on. Is the USBASP not working? I did try both ones I received, same result. Is there a way to tell?
20240823_085034.jpg
User avatar
Phil_G
Posts: 783
Joined: 15 Feb 2018, 23:32
Contact:

Re: Help with USBASP

Post by Phil_G »

Hi Bill,
Rather than just inserting the 6 pins and leaving them unsupported, you have to apply a little sideways pressure during programming to ensure a good contact on all 6 pins. Just lean it as far as it easily goes, then push a tiny bit more, hold it and click 'upload using programmer'. Its easier to do than to explain, I do it with one hand.

Just while you're getting into it maybe solder a 6-pin header to one of your DIY-Mores, until you're happy with the process.
As noted before any 'cannot set sck period' warnings should be ignored.

I'd not heard of Rogers 'reversed adapter' problem before, might be worth checking.
ncpiperpilot
Posts: 18
Joined: 13 Jul 2022, 21:05

Re: Help with USBASP

Post by ncpiperpilot »

Thanks Phil,

In the end, I actually got it working. Definitely newer code installed now as after I uploaded (although frankly I would consider this downloading when putting it on the board), did the calibration and Voila! it works and now the A6 and A7 pots are working to adjust the travel volume...or whatever that is called these days. Yay, SUCCESS!!!

Here were the next set of trials and tribulations in case anyone else has the same NEWBY problems.

1. I went back and verified the USBASP wiring to the 6-pin connector was right. Seems like I can never find the pinouts on stuff (like the DIY More board) but there were silkscreen labels on the 10 to 6-pin adapter. Wiring was fine.

2. Soldered headers for the 6 pins on the DIY More board. Just wanted to eliminate that as an issue.

3. Ran the upload again. This time I had the messages:
"avrdude: ser_open(): can't open device "\\.\COM3": Access is denied"
"Failed uploading: uploading error: exit status 1"

Then I realized I needed to select the Programmer in the Tools section. Selected "USBAVR"

4. Re-ran the upload again. This time I had the messages:
"avrdude: warning: cannot set sck period. please check for usbasp firmware update"
"avrdude: error: program enable: target doesn't answer. 1"
"averdude: initialization failed, rc=-1"
||||| Double check connectionsand try again, or use -F to override"
||||| this check
"Failed programming: uploading error: exit status 1"

Ugh... Gee, I wonder if I plugged in the 6-pin connector backward??? I had figured the dot on the corner of the DIY More board was for Gnd...evidently it wasn't. (Again why can't I find pinouts on that board????). So I said, what the heck, plugged the 6-pin in the opposite was (with MISO by the dot in the corner of the board) and Voila! the LED on the DIY More board came on. I think I'm on to something.

5. Did the upload again and YAY! it uploaded the new code...and that's the story of how I actually got there :-)

...Bill
User avatar
Phil_G
Posts: 783
Joined: 15 Feb 2018, 23:32
Contact:

Re: Help with USBASP

Post by Phil_G »

Well done Bill, yes the dot denotes pin 1 which is miso. Neg is diagonally opposite.
Sorry I should have said to set the programmer to USBASP in the IDE menu.
I think the problem with helping people is that ours have been working for years, we forget details and its easy to miss a step out :)
Bill wrote:(Again why can't I find pinouts on that board????)
Look no further than Mode-Zero Bill ! :D
See last photo in the first post:
viewtopic.php?p=962#p962


But now its working, the world is your lobster :D
We need to get Pauls working next!
ncpiperpilot
Posts: 18
Joined: 13 Jul 2022, 21:05

Re: Help with USBASP

Post by ncpiperpilot »

Thanks Phil for all your help and guidance both via emails and here. I greatly appreciate it!

I guess I should have looked here on mode-zero for the pinout. Everything I've ever needed for this conversion stuff is here somewhere :-) That's an excellent Thread you just linked! I'm excited to be learning about the arduino stuff AND getting to play with and use these old radios.

You would think the dyi-more website would have the pinout.... but not that I could find.

I documented my experience detail here in case someone else follows in my newby footsteps...and honestly if I forget, I can look here :-) That's what I love about forums and hate about FB groups and posts. You can actually find stuff in the forums, even if its from 10 years ago.

...Bill
Post Reply