NHD_0420DZW OLED example

Good Day,

Does anyone have a working example of the NHD_0420DZW OLED library being used? I am trying to use it with a nucleo STM32F411RE with no luck. Library can be found at the following link NHD_0420DZW_OLED - Library for New Haven NHD_0420DZW OLED | Mbed. Any help would be greatly appreciated.

Hi there,

sorry, but “no luck” is not a sufficient description of your problem.
What did you achieved? What display do? and so on.
That are informations you need to provide so that someone can help you.

BR, Jan

Sorry about that. What I meant by “no luck” is that I can not initialize the display nor write a character or string to it. Below is the code that I have wrote to write the character ‘A’ on the display. With this code, nothing displays on the OLED display. I have double checked the SPI connections (Clock, MOSI, MISO, Chip Select) so I don’t think it is an hardware issue.

#include “mbed.h”
#include “NHD_0420DZW_OLED.h”

NHD_0420DZW_OLED lcd = NHD_0420DZW_OLED (PA_6, PA_7, PA_5, PB_6, 0);

int main(){

lcd.init();
lcd.writeCharacter(2, 2, 'A');

while(1){
    
    }
    }

In the datasheet on page 4 is information about a Jumper Selections and in the default is the display set to 6800-MPU Parallel (default) and for the SPI interface is required a change of these jumpers. Did you do?
And do you try it in the parallel mod?

BR, Jan

Yes, I changed the jumpers to correspond to the jumper selection table for SPI communication. I did not try parallel mod. I did however just notice on the datasheet that the High Level Input must be 0.8VDD (VDD = 5V) which would be a High Input Level of 0.85V = 4V. The clock, chip select, and MOSI and MISO output from the Nucleo STM32F411RE board is 3.3V. I am going to order and try a voltage translator to bring the clock, chip select, MOSI, and MISO signals to 5V from 3.3V. I never noticed this before as the author of the OLED library didn’t mention anything about it; only that it worked with a Nucleo-F746ZG when bit banging was performed.