Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 17:37 19 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : uM2: OLED and Nokia drivers

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8606
Posted: 02:32am 15 Oct 2015
Copy link to clipboard 
Print this post

In the third tutorial on CFunctions I developed a loadable display driver for the SPI SSD1306 OLED displays. With minor modification this also works on the NOKIA5110.

This allows these displays to be used with the in-built Micromite Basic drawing commands: BOX, TEXT, CIRCLE etc. As they are monochrome displays a colour of zero i.e. RGB(black) is used to turn a pixel off and any other colour will turn it on.

Basic programs to load the drivers for both types of display are attached:

2015-10-15_122028_NOKIA-OLEDloadable.zip

The drivers are loaded using MM.STARTUP and can be saved with LIBRARY SAVE.

Both drivers need the pins specifying for:

control/data (labelled DC)
reset (labelled RST)
and chip select (labelled CS or CE)

In addition you need to connect the SPI clock pin and the SPI data out pin from the Micromite.

In the case of the Nokia you also need to specify the contrast value: &HB8 works for my display and is set in the example code but you may find any value between &HB0 and &HBF useful.

In the case of the OLED display you need to specify if it is a 1.3" display (code=1, set in the example code) or a 0.96" display (code=0). These seem to have slightly different wiring but if you are missing pixels on either the right or left of the screen try the other code value.

The current version of the code works on the 28 or 44-pin Micromite not the MM+. I could produce a version for the MM+ if required - let me know.

Note that the code only works for the SPI version of the OLED display. Trying to drive I2C from inside a CFunction is currently not possible.

Hope this is useful to someone.





 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1141
Posted: 06:15am 15 Oct 2015
Copy link to clipboard 
Print this post

Thanks a lot, Peter!
AFAIK should this very useful for many TBS users here!

Michael
 
kermess
Regular Member

Joined: 04/04/2013
Location: Spain
Posts: 45
Posted: 07:50am 23 Feb 2016
Copy link to clipboard 
Print this post

Hi there,
I am interested in knowing if there is any library for KS0108 display in format "Loadable"
Thank you
David_PM
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024