Serion wrote: ↑18 Jul 2020, 23:48
Hi, everyone! I feel like I've joined so late in the game on all this fun! I finally got my Gigatron put together (felt like quite an accomplishment for me since when I started, I didn't even know how to solder! lol)
Welcome and congratulations on getting the Gigatron up and running; it really is a testament to the attention to detail that Walter and Marcel put into the kit's construction and manual that allows so many first time success stories.
Serion wrote: ↑18 Jul 2020, 23:48
I see this thread is quite old but I'm in the same spot at the OP -- I only have an RPi (model 3b and 4).
Can someone help me with the GPIO pins to use and what they would go to on the Gigatron? And then, how do I take all the cool files I've seen people posted (like the PacMan clone) and upload them via the Pi?
Thanks in advance!
I haven't used Xbx's RPi method of uploading to the Gigatron before and he hasn't visited the forum in a while, (I'm also not an RPi user), but I've had a look at his source code that he used for uploading to the Gigatron and between us we should be able to work it out.
If any RPi experts would like to chime in with help/advice or corrections, please do!
Looking at his source:
https://raw.githubusercontent.com/xxxbx ... i_loader.c
We can see the following section:
Code: Select all
// === GPIO acess ============
// ===========================
//pins: rpi2 BCM / rpi2 board / Gigatron DB9 (J4)
static int GROUND = 0; // 34 8
static int SER_DATA = 12; // 32 2 blanc
static int SER_LATCH = 16; // 36 3 vert
static int SER_PULSE = 20; // 38 4 rouge
And according to this document the GPIO 40 pin header for RPI models 2,3,4, (and others), is physically and electrically equivalent.
https://www.raspberrypi.org/documentation/usage/gpio/
![GPIO-Pinout-Diagram-2.png](./download/file.php?id=700&sid=a052a8df69094b2bf6a9ab7445bf64c2)
- GPIO-Pinout-Diagram-2.png (215.56 KiB) Viewed 5701 times
So the first thing to do is to wire up the RPi's GPIO header to a female DB9 connector. You will need some sort of multi-conductor cable with at least 4 unique wires, (I would personally use a strip of ribbon cable for testing purposes and then clean it up later once it's running).
Don't solder directly to the RPI's GPIO header, use the correct 40pin GPIO connector appropriate to your board or better yet use a
GPIO Breakout Lead and Header for breadboard. This will allow you to access the RPI's header safely and easily, (while prototyping), using a breadboard.
Whether you use a breadboard with a breakout cable/connector or make up your own cable that connects to the RPi's GPIO header, you need to make the following connections. Make sure both the Gigatron and RPi are both powered down before commencing any of this!
- Connect RPi GPIO physical pin 32, (GPIO 12), to DB9 pin 2: this is SER_DATA
- Connect RPi GPIO physical pin 34, (Ground), to DB9 pin 8: this is Ground/GND
- Connect RPi GPIO physical pin 36, (GPIO 16), to DB9 pin 3: this is SER_LATCH
- Connect RPi GPIO physical pin 38, (GPIO 20), to DB9 pin 4: this is SER_PULSE
*Edit* Thanks to Klf for pointing out the need for 5v to 3v3 level conversion for safe/reliable operation.
- You'll also need level conversion for SER_PULSE and SER_LATCH as the Gigatron HCT outputs will drive very close to 5v and the RPi GPIO inputs expect <= 3v3. There are many ways to convert 5v logic levels to 3v3, (dedicated chips, diodes, resistors, etc), but probably the simplest for this application is a 2.2kOhm/3.3kOhm voltage divider that steps down the voltage from the Gigatron outputs.
- The resistor values that you choose are based on the voltage that you are trying to down convert to and the sinking/sourcing requirements of the input.
*Edit*
- Once you have done this, make sure you triple check all connections on your cable/breadboard, check for shorts between GPIO lines and especially for shorts between VCC and GND. Make sure nothing is connected to pin 6 on your DB9 female connector, (Gigatron's VCC).
- Plug the female DB9 connector end of your cable/breakout connector into the Gigatron's controller port, (the Gigatron should still be powered down), check for shorts, (using a multi-meter), between VCC and GND and the GPIO pins that you are using on the RPi side of your cable/breakout connector. Your RPi should not be plugged into anything whilst doing this.
- Power up the Gigatron, with just your cable plugged into it and make sure the Gigatron still functions correctly.
- Power down the Gigatron and then plug your cable into the unpowered RPi's GPIO header.
- Power up your Gigatron and then power up your RPi and watch/sniff for tell-tale signs of magic blue smoke trying to escape, if everything is functioning correctly then you should be good to go.
On the software side of things, Xbx's software seems to be a single C source file without any dependencies, (apart from a Linux C/C++ development environment). So if you haven't downloaded gcc/make/etc for your RPi, you will need to do that first.
- Download
https://raw.githubusercontent.com/xxxbx ... i_loader.c and dump it into a directory somewhere, download your favourite .gt1 files from this forum or the main repo Contrib area into the same directory.
- At a console prompt build Xbx's software like this
gcc -o raspi_loader raspi_loader.c, (the name after the -o option can be anything you like). I haven't tried building it myself so I can't guarantee anything, if it doesn't build, let us know and we'll figure something out.
- If it built correctly, use it like this
./raspi_loader test_file.gt1 skip, the skip option lets you use it without having to manually reboot the Gigatron and manually launch the Gigatron's loader.
P.S. I am not sure what electrical protection the RPI's GPIO header has, (if any), and I am not sure of the power up sequence for maximum protection of the RPi when using it's GPIO header like you will be. But because you are not mixing/using multiple VCC's you should be fine as long as you make sure that both the Gigatron and the RPi both share a common ground, (in practice this just means that you have their respective plug packs plugged into the same wall socket).
P.P.S. Even though I have double checked all the information I have provided for you, I can't be responsible for anything untoward that happens; you are going to have to use due diligence to check everything your end and check the information I have provided meets your use case. I don't own a RPi and I haven't used Xbx's setup before, so all the information I am providing is theoretical; I have not tested any of this and thus can't be certain if it will work...so good luck
![Smile :)](./images/smilies/icon_e_smile.gif)