When I wrote this, I hadn’t looked at the schematic and board layout documents. I now have.
On the schematic it shows that IREF pin 26 has been left unconnected. Try connecting a resistor of about 390k ohm to 680k ohm between IREF pin 26 and GND. I don’t know for sure, but because the current through this pin and resistor controls the brightness of the display, the OLEDs may not even light up without it.
Just to be safe, I’d connect a 10k ohm resistor between the ATmega328 RESET pin 29 (TP2) and VCC (TP7) to prevent any stray electrical noise from resetting the CPU.
Also, I’m pretty sure it doesn’t matter, but according to the documentation for the display, R/W pin 16, E/RD pin 17 and D3 to D7 pins 21 to 25 should all be connected to GND. D2 pin 20 should be left unconnected.
on the pcb board file these pins are all left unconnected.
[/quote]
In the board and schematic files, that I downloaded from the link in the original post, BS0, BS1 and BS2 are all grounded (circled in green in the board image below). This selects 4 wire SPI mode, which is what is required.
This type of display doesn’t have a backlight. Each pixel is a OLED which emits light itself.
Adding a 10k pull up on RESET likely won’t help, since you’ve already been able to play sound, indicating that the processor works without it, but it’s still a good idea to have it.
Contest is still going! I think the last time I checked you still hadn’t looked at using the software configuration of the display library. It doesn’t use hardware SPI.
I know this already an old conversation but I’ve made a similar prototype board inspired by yours with capacitive touch buttons and I would like to know if its possible to get the original Arduboy files where you have the capacitive buttons enabled?
Hope you get this message…
here the video of the board with the OLED test !!!
My Arduboy prototype:) I’m new to Arduino with no programming skills so this took me a VERY long time to figure out! I would love a titanium Arduboy @bateske:)
Awesome thanks so much Kevin!! Better late than never:) I would love to try some games on it but don’t have programming skills. If you have any of your old game sketches would love to try them:) I seem to run out of memory very quickly without being able to do much.
I agree that the memory is quite limited (I’d argue it’s probably a bigger limitation than the small monochrome screen).
You just have to be smart with how you organise things, avoid dynamic memory, be liberal with your use of progmem, avoid global variables where possible and avoid trying to implement anything too memory hungry.
You might be able to get a few Arduboy games running on it using my branch of the original Arduboy library, which I modified for the ATmega328P processor. You would have to further modify the library to map the pins correctly and handle the capacitive buttons.
I was using the Adafruit SSD1306 & GFX library for the OLED with following pins for the prototype:
MOSI 11
CLK 13
DC 8
CS 10
RST 7
I changed the CS, DC & RST pins on core.h under (AVR_ATmega328P) on your modified Arduboy branch. I can’t find any MOSI or CLK pins, do these need to be changed somewhere as well?
I’m testing with "HelloWorld " example - looks like Arduboy logo, but is corrupted…
Sorry. I haven’t been maintaining the atmega328p branch of the library, so it was missing some later bug fixes.
I’ve now updated that branch on GitHub. Please download this new version, then apply your changes again and try it. Hopefully the scrambled screen problem will be fixed.