Pluggy Reloaded

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Post Reply
norgate
Posts: 50
Joined: 20 Oct 2019, 16:50

Pluggy Reloaded

Post by norgate »

Hello all,

I am in the process of building an IO board for my Gigatron, basically a more advanced "Pluggy McPlugface", thats supposed to tap the full potential of BabelFish.

The board will connect to the Game Controller port on the Gigatron and feature PS/2 keyboard input, game controller pass-through, and USB. The whole thing will be run by an ATmega328P microcontroller running the Arduino Bootloader and BabelFish. USB will be handled by the FT232RL USB to UART Chip.

Since I'm a total newbie when it comes to electrical engineering, I'd appreciate your feedback on my current schematic as well as any other suggestions you might have.

My current plan is to build a breadboard prototype as soon as the parts arrive and, if that goes well, design a PCB.

I'll keep you posted on my progress.
What do you think so far?

Regards
Paul
Attachments
schematic.png
schematic.png (67.12 KiB) Viewed 15473 times
BobWalance
Posts: 4
Joined: 20 Oct 2019, 23:06

Re: Pluggy Reloaded

Post by BobWalance »

I want one, too! Have you considered offering them for sale? I'm very surprised that Gigatron didn't include a game controller pass through on their McMuffin. It seems like this will be a big inconvenience (I'll know in a couple of weeks when I get my full kit).

I'll take a closer look at your schematic later, but I did notice that I couldn't find the source for the net "VCC'. Is it the same net as the 5V from the USB? Check your netlist.

Keep us posted on your project.

Bob
PurpleGirl
Posts: 48
Joined: 09 Sep 2019, 08:19

Re: Pluggy Reloaded

Post by PurpleGirl »

From what I see, VCC comes from the Gigatron. The USB's VCC comes from the controller chip, and that chip gets it from the Gigatron. I am wondering if the VCC to the chip and the VCC to the USB port are not wired the opposite way on the controller. It seems VCC on the chip should feed the chip and the VCCIO should feed the USB socket. But double-check to be sure.

Also, on the USB controller, where are the clock signals and UART control signals? It doesn't magically make all of that.
Last edited by PurpleGirl on 21 Oct 2019, 06:49, edited 1 time in total.
BobWalance
Posts: 4
Joined: 20 Oct 2019, 23:06

Re: Pluggy Reloaded

Post by BobWalance »

I think you need the 6 pin programming header or you'll have to buy 328's with the USB bootloader already programmed.
User avatar
marcelk
Posts: 488
Joined: 13 May 2018, 08:26

Re: Pluggy Reloaded

Post by marcelk »

Very cool!

Indeed, check that you don't get 5V from two sides. I have the Gigatron's VCC-to-Arduino disconnected when I hook up the Arduino to a laptop. Or put some diodes on both lines, pointing towards the device. But there will a voltage drop, and the keyboard may not like it. I normally use a terminal program and the 't' command in the laptop setup.

Looking at the BabelFish.ino code, the game controller feedthrough has been broken for more than a year: ever since the PS/2 keyboard handling runs in lock step with the vertical sync. It will be a mini project to fix that. For that it's best to give the game controller its own latch and pulse signals, instead of sharing them with the Gigatron. Then BabelFish has the time to probe the game controller at its own convenience and rate.
norgate
Posts: 50
Joined: 20 Oct 2019, 16:50

Re: Pluggy Reloaded

Post by norgate »

Thanks all very much for your feedback!
BobWalance wrote: I want one, too! Have you considered offering them for sale?
I didn't expect that so soon :). I'll get it working first, and then I might consider it.
PurpleGirl wrote: From what I see, VCC comes from the Gigatron. The USB's VCC comes from the controller chip, and that chip gets it from the Gigatron. I am wondering if the VCC to the chip and the VCC to the USB port are not wired the opposite way on the controller. It seems VCC on the chip should feed the chip and the VCCIO should feed the USB socket. But double-check to be sure.
VCC indeed comes from the Gigatron, since the USB Connection should be optional, like it is on the Arduino. The USB controller is currently powered through USB (not the other way round). I will probably follow marcel's suggestion and add diodes, so it can be powered by either USB or the Gigatron. It does work that way, right?
PurpleGirl wrote: Also, on the USB controller, where are the clock signals and UART control signals? It doesn't magically make all of that.
As far as I know, both the USB Controller and the Microcontroller have an internal oscillator, that should be sufficient. The UART is asynchronous, and therefore shouldn't need any additional control signals. The Arduino Nano uses a very similar setup and doesn't have an external clock on the USB Controller: https://www.arduino.cc/en/uploads/Main/ ... .2-SCH.pdf
I could be missing something of course, but I will try It like this.
BobWalance wrote: I think you need the 6 pin programming header or you'll have to buy 328's with the USB bootloader already programmed.
For now the 328 will be a socketed DIP package, so I can flash the bootloader on a breadboard. But I will consider adding an ICSP header anyway.
marcelk wrote: Looking at the BabelFish.ino code, the game controller feedthrough has been broken for more than a year: ever since the PS/2 keyboard handling runs in lock step with the vertical sync. It will be a mini project to fix that. For that it's best to give the game controller its own latch and pulse signals, instead of sharing them with the Gigatron. Then BabelFish has the time to probe the game controller at its own convenience and rate.
Good to know, I didn't test that yet. I will do as you suggest and separate the latch and pulse signals. And then check how I can make the program work.
monsonite
Posts: 101
Joined: 17 May 2018, 07:17

Re: Pluggy Reloaded

Post by monsonite »

Hi Norgate,

The ATmega328 will need a 16MHz crystal across pins 9 and 10 and 2 x 22pF capacitors to ground - in order to keep it fully compatible with the Arduino bootloader serial timing.

The standard Arduino will accept interupts on Dig 2 and Dig 3 - make sure that you have these connected correctly to receive the PS/2 output. At first glance it appears that clock to Dig 3 is all good.

Marcel spoke about modulating V-sync to provide a very slow serial output. It runs at 60 baud - or 6 characters per second. This is about as fast as most of us type.

If you routed V-sync (SER_Latch) to pin PD2 (Dig 2) you would be able to receive this (bit-bang serial input using interrupt) and make good use of it. You don't need many characters to control an I/O slave.

https://www.youtube.com/watch?v=tAAXzB0iqBw

I would connect all of the spare I/O pins of the ATmega to suitable headers so that you can use them for connecting for example Blinkenlights, and other input and output devices - the Arduino becomes your I/O slave.

You could even add a microSD card to act as a ROM cartridge. It would probably only be sensible if it were read only - but could serve preloaded program files to the Gigatron in response to a few characters received via the SER_LATCH signal.
monsonite
Posts: 101
Joined: 17 May 2018, 07:17

Re: Pluggy Reloaded

Post by monsonite »

Hi Norgate,

I recently came across a very low cost Arduino clone from Malaysia called the Maker UNO which has the advantage of Blue LEDs to show the state of all I/O pins and a small speaker on one of the I/O pins.

https://www.robotshop.com/uk/cytron-mak ... 10EALw_wcB

In the US they are $6.75 from here https://www.robotshop.com/en/cytron-mak ... oller.html

In truth, you can buy these for less than the combined cost of the ATmega328 and FTDI232. You get an attractive product which has all the bells and whistles you need.

Your "Pluggy" board could just be a carrier board that holds the DB-9 connectors "back to back" and the PS/2 keyboard connector, and some I/O headers with very little else. The design is completed by plugging in a Maker UNO or any other generic Arduino UNO R3.

You have the advantage of Analog inputs, PWM outputs etc and if you set up the UNO as an I/O slave - controlled by single character commands, you have a very versatile I/O device for the Gigatron.


Just a thought?
norgate
Posts: 50
Joined: 20 Oct 2019, 16:50

Re: Pluggy Reloaded

Post by norgate »

Hi Monsonite,

while I would prefer to have a one board solution, your suggestion sounds like a great first step, to get the software and IO side sorted out.
I might actually do both since this is mostly an exercise for myself anyway. I would probably use a Pro Micro instead of an UNO then for the smaller size.

Thanks for the remarks regarding the Crystal, additional IO and serial.
monsonite
Posts: 101
Joined: 17 May 2018, 07:17

Re: Pluggy Reloaded

Post by monsonite »

Hi Norgate,

I'd be happy to give you a hand laying out the pcb.

I have 10 years experience of EagleCAD - and this sounds like the sort of project that could be done using the (free) EagleCAD Lite version.

I have also developed a very compact interpreted language called SIMPL, which is ideal for using an Arduino as an I/O slave.

Single character commands, or short text messages, can be used to trigger a whole variety of I/O actions or mini sequenced programs on the Arduino.

It might be a useful first step to get something running on an Arduino alongside Babelfish.
Post Reply