Hi,
I'm trying to create a Master System to Megadrive converter in order to play Sega MS games on my Megadrive / Genesis.
Some games need to have a stack initialized, so I've chosen to use an Arduino Nano to do that.
All my work is based on these pages (in French, sorry) :
With my PCB without the Nano, I can launch games that don't need stack initialization. But if I put the Nano, flashed with a soft that set D0 to D8 as input, I have a black screen. With this soft the Nano should have no effect, so I don't understand what's wrong.
I use an Elegoo Nano.
I've tried to cut Vin so that the Nano shouldn't power on, but it still starts. It seems that it is powered by IO inputs. Is it mormal ?
Thantks for your help.
I don't know anything about a Megadrive or a stack initialization, but I noticed a few things.
What is the voltage of VCC ? It is connected to VIN of the Nano.
The Nano starts the bootloader, which uses pin 0 and 1 (TX and RX). You use those pins in the circuit. If you don't use them, then you can also send debug messages to the Serial Monitor. There are enough free pins to put OE and CE on and even the analog pins A0...A5 are also digital input and output pins.
The Nano does nothing (except with pin 0 and 1 and maybe 13) with an empty sketch:
void setup() {}
void loop() {}
If the Nano is not powered, a voltage at a pin flows internally to the power and the Nano starts working. Yes, that is normal.
Good explanation:
The "D0" is not connected to the Arduino Nano, is that okay ?
Thank you very much.
VCC is 5V. From what I've understood from the documentation, I coud use it on either VIN or +5V pin, I've chosen VIN.
I didn't know the bootloader could use pin 0 and 1. I will modify that on my prototype and test it.
D0 is not connected, it has a pull up resistor. From what I've read it's the solution used by Sega on official converter.
Arduino is open-source and everything is online.
The Nano with a schematic is here: https://store.arduino.cc/products/arduino-nano
It has a LM1117 voltage regulator which has a voltage drop of 1.1V. That means the Nano runs at 3.9V. It will run, but that is low.
I suggest to use the 5V pin to power the Nano.
I've switch my CE and OE signal on pin 11 and 12, and game (that doesn't need stack init) starts if I put all pins as INPUT. Thank you very much.
I've tried using 5V pin instead of VIN. CE signal is set to HIGH at startup. if I test it with voltmeter when powered by USB, I have 5V on CE. If I use 5V, once plugged in the console CE signal is 1.8V and console detects it as LOW. If I use VIN, it is 3.9V and console detects it as HIGH. So I'll keep using VIN pin.
My last issue is that OE signal should vary between0 to 5V, and my code doesn't detect it. If I test with voltmeter I have 2.75V. That's not normal. I think I need an oscilloscope to test that more precisely.
That doesn't sound good.
Did you connect the GND of the 5V power supply ?
Are the OE and CE actually 3.3V signals and 5V damages something ?
Does the OE pin need a pullup resistor ?
There is a diode from the USB power to the 5V pin on the Nano board. If you power the Nano via a USB cable, then its 5V pin is about 4.5V. That is normal.
Ground is connected correctly at both ground pins of the nano.
OE and CE are 5V signals. CE is set to high by nano and OE is a bus clock to synchronize data read. So I don't think OE needs a pullup resistor, I think it's just that it is not readable with a voltmeter.
The Nano should run okay at 3.9V (when powered with 5V to VIN), but in a 5V system it should run at 5V and you should not read those weird voltages I'm sorry, I don't have a clue what is going on.
I've re-checked everything, and I've found 2 bad solders : one on 5V, and one on OE. Now that I've repaired them it works. (In fact it still doesn't work, but now it should be only software)
Thanks a lot for your help and your advices.
If you use that empty sketch from post #2, and power it via the 5V pin, then it should not influence the circuit.
If it does, then something is very wrong or broken.