I expected to see coloured rectangles on the screen. I have tried drawing circles, rectangles etc. and just making the screen a solid colour. However, the result is always the same with random coloured pixels and a greenish (I have a degree of colour blindness
) band across a portion of the screen. An image is attached.
I’ve checked all my wiring and pin definitions in the sketch many times and can’t find the answer on the Internet including this forum. Any suggestions would be appreciated.
Incidentally your BLE33 has a VUSB solder-bridge on the bottom of the pcb.
You need to solder the bridge to make the 5V pin work on the pcb.
Then you can connect the display VCC pin to your BLE33 5V pin. i.e. power everything from USB cable.
The BLE33 has 3V logic. That is absolutely fine for your display.
I would avoid using a separate regulated 5V source. It is much safer to use the same power for BLE33 and display.
Thank you all for the suggestions. Despite being a beginner, I should have picked-up on the note about keeping the power and voltage levels the same. In any case, I've tried the suggestions with no effect.
I've attached a picture of the wiring diagrams for the two voltage configurations that were suggested.
Also, I have two BLE 33s and have tried the oled display with both with the same result.
As a beginner, and only having a multi-meter, how might I go about debugging this problem?
Also, I was thinking if there was a setting inside of the library .cpp files that might need to be set. I've had a look but it's all too complicated for me to understand.
I installed Adafruit_SSD1351 via the IDE Library Manager.
And edited the library example "test.ino" to suit my particular wiring
// You can use any (4 or) 5 pins
#define SCLK_PIN 13 //2
#define MOSI_PIN 11 //3
#define DC_PIN 9 //4
#define CS_PIN 10 //5
#define RST_PIN 8 //6
Built and ran on my BLE33 board with a Chinese clone SSD1351 board.
The example worked fine (as bit-banged SW SPI)
So I then changed to the HW SPI constructor (Option 2).
// Option 1: use any pins but a little slower
//Adafruit_SSD1351 tft = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, CS_PIN, DC_PIN, MOSI_PIN, SCLK_PIN, RST_PIN);
// Option 2: must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_SSD1351 tft = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, &SPI, CS_PIN, DC_PIN, RST_PIN);
which also worked.
David.
Edit. The only difference between my wiring and your wiring is DC on D9 instead of D7.
Yes, fortunately the Blink program works fine. When running with 3.3v attached to the display, the display shows the same pattern as in my original photo.
Yes, thank. The GND of the OLED and the GND of the Arduino are connected together. VCC on the display is attached to the 3.3V output on the BLE 33. I am assuming that this takes care any possible problems with logic levels between the display and BLE 33.
The Waveshare appears to have an AMS1117-3.3 voltage regulator chip. (top right of pcb in the Wiki)
So you can safely supply 5V to VCC pin. The regulator ensures that the SSD1351 runs at 3.3V.
Your BLE33 has 3.3V logic. So this is correct for the SSD1351.
I disagree with the Waveshare Wiki regarding 5V logic "Uno plus" board connections.
From the datasheet the logic signals must be <= 4.0V
Oh, I am guessing about the AMS1117 chip. Please can you read the part number.
And the display will actually "work" with VCC pin =3.3V because AMS1117 are "Low Drop Out" regulators.
I shorted out the Vusb and connected the oled to the 5v pin on the BLE 33. I get the same result as when connected to the 3.3v pin on the BLE 33. Note: the GNDs of the BLE 33 and oled are connected together.
I've attached a photo of the back of the oled. The only part number I can see is the one on the lower left of the photo on the ribbon cable going to the display. If this is the one that you mentioned please let me know because it will take a little for me to read the number since I'll have to dig up a magnifying glass somewhere.
I see that you mentioned bit-banging. I looked it up and get the idea. i found a sample for an Arduino so will try to get that to work so I can determine if the oled is damaged.
Also, I did try the first constructor in the "test.ino" sketch but it did not work at all. The oled was just blank.
The sample bit banging program that I found is too difficult for me at this stage of my learning.
Do you know of a very simple example that I can download that would allow me to simply write values to the oled memory locations through the 4 wire SPI ? I think that is how the oleds basically work. Is that a useful route to try?
Please read the part number printed on the black chip with 5 legs. (at top right of your photo)
You will need a good light and magnifying glass. The printing on integrated circuit chips is difficult to read.
Please post a photo of the coloured wires connected to the BLE33 board.
We can examine the quality of the header pin soldering. And check the wire placement.
My apologies. I discovered that there was a link to the schematic in your Waveshare Wiki. This clearly shows the 3.3V regulator. It is RT9193-33 (which is an AMS1117-33 equivalent)
Unless you have let the smoke out I would expect your OLED to work just fine.
Thank you very much for digging that out. I did manage to read the printing on the chip, OE=AID.
I've attached three pictures. Two showing the wiring and one that I tried to get of the solder joints. The solder joint picture is not too good unfortunately but the best that I could do with my phone.
Your wiring looks correct. Your soldering looks ok.
I have never seen Duponts with angle male ends.
I suggest that you use "long" male header strip which will sit in the breadboard securely. These can receive your female wires.
Alternatively, mate your existing wires with the angle pins and secure with sticky tape, bluetack or hot glue. So you have reliable contacts.
Personally, I don't like flying wires. I solder male or female header strip to Protoshields. Solder the connections between strip, sockets, components, ...
For example. I just plug my SSD1351 module into a socket on a Protoshield. (which is why my wiring is different to yours)
That makes no sense to me. Perhaps it is a different part number for another AMS1117 equivalent.