Page 1 of 6

How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Thu Aug 11, 2016 4:56 pm
by Helder
As promised here is the guide for USBasp users, now you can use the Arduino IDE to do this as well but you need to compile the files and all that and in this guide I use AVRDudess a GUI to the awesome AVRDude. If you have a MAC OSX and a USBasp then you will need the sketches from the other thread and upload it through the IDE, simply Choose USBasp from the programmer Drop Down menu.


The files (Windows Users Only):

https://cdn.discordapp.com/attachments/ ... DUDESS.zip
or
http://www.mediafire.com/download/db7mq ... DUDESS.zip



Use these new Hex files for more stability and no multi button presses

http://www.mediafire.com/download/9gtqe ... _Files.zip


Extract the File and there should be 2 folders
Image

We only need the AVRDudess folder but I included the USBasp drivers in case it was needed.


Now we need to setup our programmer ISP pin header, if you have an adapter like this below or a cable with 6 pin holes get a 6pin double header
Image


Put the header in the cable/adapter with the long part in so only the little stubs show:
Image


Now be sure you line up the pins of the cable/adapter properly with the board ISP pins and they go in the same named holes or you could damage the board.
Image






Programming:

Open up the AVRDudess program and set up everything as you see in the image below, I have numbered steps that I will explain.
Image


1. Choose USBasp and also set the bit clock.
2. Set the Fuses exactly as shown and check off the box
3. Set it to Erase the Flash
4. Choose one of the 3 hex files I provided in the AVRDudess folder
5. Connect the ISP header and push on it so it makes contact with the ISP hole walls like in the previous image above. Hit Detect and it should show the Atmega32U4 in the message window.
6. Hit Program! and let it do it's thing all the while you're holding the ISP header in place


Once it's programmed you will get the Verified Message and you're done!
Image

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Thu Aug 11, 2016 5:16 pm
by jeffy1021
Thanks @helder, looks very straightforward. My USBasp is still on its way but I'll be sure to give this a go. Too bad I don't have a 2x3 header. I wonder if I can cut a longer one to size, but worst case I'll have to solder 6 wires.

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Thu Aug 11, 2016 5:24 pm
by Helder
jeffy1021 wrote:Thanks @helder, looks very straightforward. My USBasp is still on its way but I'll be sure to give this a go. Too bad I don't have a 2x3 header. I wonder if I can cut a longer one to size, but worst case I'll have to solder 6 wires.
that's actually what I did, I cut a large one to get that size and they are meant to be cut as needed but wires work too although holding them all in place can be more challenging.

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Sat Aug 13, 2016 3:18 pm
by Brett82
can we do the bootloader too??

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Sat Aug 13, 2016 4:50 pm
by Helder
This method is for the USBasp or Arduino as ISP but the files I provided will have the good Leonardo Bootloader so the boards can be updated through the Arduino IDE if you so wish (why would you when you have the programmer?)

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Sun Aug 14, 2016 6:06 pm
by RetroGamingNow
My whole build is done for the most part. Everything is wired. Do i need to take it apart to reprogram the board at this point? I am using a MAC as well. Im kind of confused as to where to start here and how to do this. I downloaded the Arduino Sketches as well as the GBZAIO Fritzing Part. Just not sure as to how the exact process works on the OSX system.

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Sun Aug 14, 2016 9:30 pm
by RetroGamingNow
My USBasp doesn't seem to want to show up in a port on my MAC - any advice?

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Mon Aug 15, 2016 8:09 pm
by RetroGamingNow
Update:

Gave up on the MAC

Using a windows laptop I was able to successfully reprogram the boards using this USBasp method. One hiccup i ran into was installing the drivers though. I was able to sort it out b following this video. https://www.youtube.com/watch?annotatio ... 2_wG6BZncI The language is in English but the video is not. If you follow what he says and look carefully at the pictures step by step you should be able to get the drivers installed correctly.

After the drivers are installed if you follow @Helders guide you should be able to get it done easily. Good luck.

Side note: I do have one extra USBasp that im going to throw up for sale in the buy/sell forum if anyone is intersted.

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Sat Sep 10, 2016 5:59 pm
by hueblo
Code made it easier to program the AIO at initial emulation station setup. I had trouble programming it but was advised to hold the 6 pin header at different angles and the program was able to detect it with no problem.

Re: How to Program Helder's All in One GBZ PCB with USBasp Programmer

Posted: Mon Sep 19, 2016 2:55 pm
by Tjfreund
I seem to be having a problem when I try to reprogram the PCB
1. I get an error message "warning cannot set sck period" (which I read is a benign error for most USBasp Programmers obtained from China off EBay)
2. More ominous however when finished programming it says avrdude.exe: 1 bytes of efuse verified (before the Done/Thank you message)

Any idea as to what I might have done wrong ... or is it the case that it verifies
- the flash data is been written successfully
- followed by 3 messages for a single byte of fuse data (l, h, e)

Just want to make certain as the screen capture in the instructions seemed to show it verifying the flash data & then says done