How to Program Helder's All in One GBZ PCB with Arduino IDE

Discussion about other hardware (including other Pi-like boards)
Post Reply
User avatar
Helder
Trailblazer
Trailblazer
Posts: 2735
Joined: Thu May 05, 2016 8:33 am
Location: Fall River, MA
Has thanked: 1398 times
Been thanked: 3064 times

How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by Helder » Thu Aug 04, 2016 7:05 pm

So as promised here is a guide to program the All in One boards with Arduino IDE. This guide is geared towards the Windows OS and not the OSX but should be very similar and primarily getting the board into Bootloader mode being the important thing here.

Hardware you will need :
GBZ All in One (Duh)
a USB cable cut and stripped (get it from old device or extension cable)
a push button aka a Tactile Switch


Optional:
6 pin double row header

Software Needed:
Arduino IDE (provided below with everything needed)
http://www.mediafire.com/download/2z88b ... 1.6.10.zip


GBZ Controller Sketches (provided below) Older Not Always Stable Use Newer One Below
http://www.mediafire.com/download/wp091 ... etches.rar


New GBZ Controller Sketches (more stable and no multi presses)
http://www.mediafire.com/download/fu845 ... etches.zip



Instructions:
Cut and strip the USB wire so you get something like this:
Image

Using the color code of the USB wire:
Image

We wire the usb to the PCB like so:
Image



Now the Optional but very recommended, take the pin header and Tactile switch:
Image

Find which 2 legs of the Switch has continuity once you press it (with a multi meter) and cut the other 2 off. Solder the remaining 2 legs of the switch to the last 2 pins on the header like so:
Image
Image

Then put the soldered pins into the ISP header with the switch legs going into the Reset and GND holes like so:
Image

That's it for the Hardware part.



Software Part:

Download both Files above and extract the arduino-1.6.10.zip to some directory of your choice, and run the arduino.exe
The program might disappear and seem like it crashed but is actually making some directories needed for it's proper function.

Go to your "My Documents" folder and you will see a new folder called "Arduino" leave it there and open the other zip file Arduino Sketches.zip and in it is a folder called "Arduino".

Take that folder and put it in your "My Documents" folder and overwrite the one there when prompted to.


In windows Start Menu click on the search bar and type : device manager
Image

Leave this window open and plug in your controller into a USB port, Windows will try to install the drivers for the board but one will fail.

You will see this on the Device Manager:
Image

Right Click on the Device and Choose the first option: Update Driver Software
Then choose the 2nd option:
Image

Browse to the Arduino program folder you extracted and find the "drivers" folder and choose that and hit Next:
Image

Windows asks if you want to install the device so say yes and check off the box:
Image

Confirmation of install:
Image


Success!
Image

Take note of the COM port (yours will be different) and leave the Device Manager Open.



Programming:

Open up the Arduino program:
Image

Image

Go to the GBZ_Controller folder then No Analog then Gameboy.hex and choose the file Gameboy.hex.ino
Image

Once done go to Tools and set up the options as follows (your COM will be a different number):
Image


This COM is the normal function of the board but in order to program it we need it to go into Bootloader mode and it will have a different COM number. Put the header with Tactile Switch into the ISP header like in the image above and be sure to press it up against the ISP hole walls and press the button 2 times in quick succession.

Go to tools again and now another COM Port is there!
Image

Choose this new COM post and hit the Upload button the Sketch will compile and then it will upload and hopefully you get a Upload Successful message.

Now this damn bootloader double reset is tough to get into, I literally got into it 3 times out of 40 tries. Best thing to do is try to get into bootloader mode at the end of the compile right before you see it uploading as the bootloader mode only lasts 8 seconds.

I really suggest getting the $3 USBASP to make this alot easier. I plan to use a different bootloader in the boards to be sent out next week to avoid this.
Last edited by Helder on Fri Sep 02, 2016 8:12 am, edited 2 times in total.
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

User avatar
Fleder
Posts: 848
Joined: Thu May 05, 2016 9:04 am
Location: Germany
Has thanked: 182 times
Been thanked: 257 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by Fleder » Fri Aug 05, 2016 2:13 am

Oh god! This Tactile Push Button Switch is killing me :lol:
Where did you get this? In a drag queen store? :D

Brett82
Posts: 52
Joined: Fri Jul 08, 2016 8:12 am
Has thanked: 17 times
Been thanked: 23 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by Brett82 » Fri Aug 05, 2016 4:28 am

I am glad I have ordered £3 USBASP but its gotta come from china :( will use the hardware method fix till then but probably gonna just add a anal stick anyways, which ones are best psp or nds sticks??

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2735
Joined: Thu May 05, 2016 8:33 am
Location: Fall River, MA
Has thanked: 1398 times
Been thanked: 3064 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by Helder » Fri Aug 05, 2016 7:44 am

Yes the PSP stick and that tactile switch is a giant yes lol I was experimenting with different sizes and this was the one I happened to grab.

A USBasp guide is coming soon, maybe even today.
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

jeffy1021
Posts: 71
Joined: Mon Jun 27, 2016 10:58 am
Has thanked: 19 times
Been thanked: 17 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by jeffy1021 » Fri Aug 05, 2016 11:58 am

Thanks for the guide @helder

I was not able to get the sketch to compile in OSX, but it works fine in Windows so don't bother with OSX :D

User avatar
PotaTox
Posts: 128
Joined: Wed Jul 06, 2016 2:45 pm
Has thanked: 19 times
Been thanked: 19 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by PotaTox » Fri Aug 05, 2016 9:11 pm

When I plug in the board, it shows up for 5 seconds, then disconnects. Do I just have to act fast, or order the programmer?

User avatar
wermy
Site Admin
Posts: 1342
Joined: Tue May 03, 2016 8:51 pm
Has thanked: 617 times
Been thanked: 1318 times
Contact:

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by wermy » Mon Aug 08, 2016 9:02 pm

For OSX users: I was able to program the board using the following steps:

Follow the instructions here to install the sparkfun boards for the Arduino IDE to use: https://github.com/sparkfun/Arduino_Boards
Wire up a button (or even just two wires that you momentarily press together to act as a button) to the RESET and GND pins on the board

In the Arduino IDE under the Tools menu:
Select Sparkfun Pro Micro for the Board option
Select ATMega32U4 5V, 16MHz for Processor
Select AVRISP for Programmer (NOT "AVR ISP mkii")

Press the Upload button in the Arduino IDE
Immediately press the reset button you wired up (or touch the wires together for a moment)
It should program it just fine!
ImageImageImageImage

User avatar
Popcorn
Trailblazer
Trailblazer
Posts: 354
Joined: Thu May 05, 2016 12:58 am
Location: Berlin
Has thanked: 29 times
Been thanked: 71 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by Popcorn » Tue Aug 09, 2016 1:41 pm

Instead of building that monstrosity of a reset switch, can I not just using a single breadboard jumper wire and carefully close the reset pins when needed? We are only closing the ISP Reset to GND, correct?

Image

EDIT: Ok, I'm reading that it's hard to get the timing right to get it into the bootloader reset mode. That's why you are using a tact switch. I'll try to come up with something (albeit, perhaps, a little less tall) ;-)

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2735
Joined: Thu May 05, 2016 8:33 am
Location: Fall River, MA
Has thanked: 1398 times
Been thanked: 3064 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by Helder » Tue Aug 09, 2016 2:25 pm

Popcorn wrote:Instead of building that monstrosity of a reset switch, can I not just using a single breadboard jumper wire and carefully close the reset pins when needed? We are only closing the ISP Reset to GND, correct?

Image

EDIT: Ok, I'm reading that it's hard to get the timing right to get it into the bootloader reset mode. That's why you are using a tact switch. I'll try to come up with something (albeit, perhaps, a little less tall) ;-)
You can use a wire and Ground the Reset if you'd like but the timing is hard basically the damn Bootloader gives you 750ms to input the double reset according to the SparkFun bootloader info page. That Monster tact was what I first pulled out of my drawer so :P
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

User avatar
PotaTox
Posts: 128
Joined: Wed Jul 06, 2016 2:45 pm
Has thanked: 19 times
Been thanked: 19 times

Re: How to Program Helder's All in One GBZ PCB with Arduino IDE

Post by PotaTox » Wed Aug 10, 2016 4:00 pm

@Helder Will this USBasp programmer work?

I'm having a hard time, because it always gets out of bootloader mode before it finished uploading. It happens in less than 8 seconds for me.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest