Digole OLED displays not working?

Hi @peekay123, thanks a bunch for responding, and for the layman’s explanation of SPI :slight_smile: I’ll need to do some more testing, it appears. I also was never able to get text to output to the screen via the print() method. So in the meantime, I tried using SoftSPI again. I was able to create two instances of DigoleSerialDisp and pass different text messages at the same time without a hitch. Yay!

I hope you can figure out a way to get this working! Using SPI should make it simple but double check the data sheet, and see if you have to do anything special. As for printf once you can print anything to the screen I recommend sprintf to help get text displayed, you can find more about this at http://www.cplusplus.com/reference/cstdio/sprintf/. Would you mind showing the code you are using to initialize the display and what library are you calling fro the display?

1 Like

I, too, couldn’t get hardware SPI to work ( 2 different cores, 2 different digole 128x64 OLED white modules with data= A5, Clk=A3, and SS=A2). Had a wild guess that it was a timing issue and found that changing line 60 in
github.com/timothybrown/Spark-Core-Sundries/blob/master/DigoleSerialDisp.h from delayMicroseconds(1); to delayMicroseconds(5); got it to work reliably for DigoleSerialDisp_Demo.cpp. Haven’t tried the geometry demo yet.

1 Like

Hi bpr, thanks for the response! I tried doing what you suggested, but unfortunately there are still no dice. For the moment, I’m happy with SoftSPI working fine, so thanks for all help everyone :slight_smile:

Pete, in case you want to try again, I ultimately found I needed to change another line. The lines I changed were the two delayMicroseconds calls like so:

SPI.setDataMode(1);
        SPI.begin(_SS);
    }
    
    void end(void) {
        pinMode(_SS, INPUT);
        SPI.end();
    }

    size_t write(uint8_t value) {
        
        PIN_MAP[_SS].gpio_peripheral->BRR = PIN_MAP[_SS].gpio_pin; //Low
        delayMicroseconds(10); //10 fixes it **********************
       
       
        //SPI.setDataMode(3);
       
        SPI.transfer(value);
        
        
       // SPI.setDataMode(0);
    
        delayMicroseconds(100); //100 fixes it **************************

        PIN_MAP[_SS].gpio_peripheral->BSRR = PIN_MAP[_SS].gpio_pin; //High
        return 1;
    }
#endif

Hi bpr, I’m not sure what I’m doing wrong but I still get no output with hardware SPI, even with your changes. Honestly though, it isn’t too big a deal since I can still use SoftSPI, but I appreciate y’all still trying to help :slight_smile: