How can I display anything on OLED display using SPI?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I display anything on OLED display using SPI?

647 Views
patrykokruta
Contributor I

Hi, I am trying to display some random pixels on this display using SPI. As a master MCU I use KL46z. My whole code was written from scratch based on driver's datasheet. The problem is that i can't display anything and I don't know what I am doing wrong. I am looking for somebody who might have worked with such display or in general  used SPI to work with different display and could see if something's missing or whether I have some mistake in logic. I checked SPI signals with logic analyzer and they look fine. That's a repository with a code. Thanks for any help.

Tags (3)
0 Kudos
1 Reply

476 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Patryk Okruta ,

    About the OLED display, normally, you need to find some driver code for it, I search it from google, and find someone share the related code driver:

https://github.com/lorneb/Adafruit_SH1106

   So you can check it, whether your related SPI sendout command it correct.

 About the SPI chip driver, you need to check it with your OLED driver chip, the clock frequency, the Clock Phase and Clock Polarity is the same as your OLED driver chip.The SPI_CS pin, I suggest you use the GPIO to control it, just make sure the CS wave is corrent.

 About the OLED chip app driver, I suggest you refer to the examples in the github, it may useful to you. You also can check it with your OLED chip company, whether they already provide some C code about it.

Wish it helps you!

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos