![]() |
Forum Index : Microcontroller and PC projects : uM2: OLED and Nokia drivers
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10066 |
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: GermanyPosts: 1526 |
Thanks a lot, Peter! AFAIK should this very useful for many TBS users here! Michael causality ≠ correlation ≠ coincidence |
||||
kermess Regular Member ![]() Joined: 04/04/2013 Location: SpainPosts: 45 |
Hi there, I am interested in knowing if there is any library for KS0108 display in format "Loadable" Thank you David_PM |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |