Jump to content

OLED support


tago

Recommended Posts

Hi all,

i would like to know more about OLED displays and how to connect and use them. It looks like you can connect say 8 OLEDs via J15A on CORE_STM32F4. 

I assume these wirings are ok for STM32F4.

http://www.ucapps.de/mbhp/mbhp_lcd_ssd1306_single_mios32.pdf

http://www.ucapps.de/mbhp/mbhp_lcd_ssd1306_multiple_mios32.pdf

Every OLED gets it's own CS-Line (CS0-CS7 on J15A) and all other pins are connected in parallel. What does the X = 0..127 or X = 128..255 values mean?

 

Edit: here it is better pictured, should work

http://wiki.midibox.org/doku.php?id=oled

Edited by tago
Link to comment
Share on other sites

This thread gives good answers about the total number of SSD1306 Displays you can manage with MIOS32 :

So kind of a lot could be managed at same time by multiplexing CS lines (See Latigid Display Line Driver)
Imagine total display surface as one big matrix of pixels . Each X/Y values on SSD1306 screens in UCApps Schematics corresponds to offsets for each screen (eg your offset in the total display matrix)

Also about OLEDs i am wondering about Text- based references natively supported by MIOS ? I've seen some working on photo without digging more.
May some peoples experienced with this could answer about ? I'll try by my side to dig the forum more.

Bests,
JK

Edited by Psykhaze
Link to comment
Share on other sites

50 minutes ago, Psykhaze said:

Imagine total display surface as one big matrix of pixels . Each X/Y values on SSD1306 screens in UCApps Schematics corresponds to offsets for each screen (eg your offset in the total display matrix)

Ok, so it works like a oldschool video wall (e. g. 8 single screens == one big screen)? Is it kind of a address (pixel area) for every OLED?

I'd like to know how to draw graphics/fonts on the screens or specific areas of the screens. Where do you define all that?

 

 

Link to comment
Share on other sites

Hi there,

it is probably most evident when looking into TKs codebase, e.g. this directory contains the graphical fonts:

http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fmodules%2Fglcd_font%2F

(here you see, how the mios default fonts are definied - these are bitmap fonts, that are directly converted into C datastructures for use - there is also a converter tool, that allows to create own fonts)

and then, most interesting:

http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fmios32%2Fcommon%2Fmios32_lcd.c

this shows the standard lcd/glcd routines,

of interest will be functions like

s32 MIOS32_LCD_FontInit(u8 *font)

s32 MIOS32_LCD_GCursorSet(u16 x, u16 y)

s32 MIOS32_LCD_PrintChar(char c)

and so on...

Have fun!

Many greets,

Peter

Link to comment
Share on other sites

@Hawkeye Thanks Peter.

Is mios32_lcd.c instantiated as LCD class or is this only helper functions? The var mios32_lcd_device indicates an ID for each LCD. Do you know where these functions get triggered or (if) class gets instantiated?

Do you know if it is out of the box possible to have virtual LCDs? E. g. split one physical 128x64 LCD in two 128x32 screens?

Link to comment
Share on other sites

Hi tago,

in the end, everything is possible, if you are not shy to code a bit...

For the mios32_lcd_device stuff, I suspect it is in here (did not have time to look more deeply):

trunk/modules/app_lcd/universal/app_lcd.c

mios32_lcd offers some generic functions, that can be refined in your own source code.
For example in a more complex project handling an extended graphical display (256x64px, 16 shades of blue), demo here:

# application specific LCD driver (selected via makefile variable)
include $(MIOS32_PATH)/modules/app_lcd/$(LCD)/app_lcd.mk  

... you usually add app_lcd to the makefile as shown above... this is then built and linked from the MIOS module path (trunk/modules/app_lcd). From there, your custom lcd driver (here ssd1322) offers functionality specific to THAT display, based on standard mios callbacks, e.g. APP_LCD_GCursorSet()...
Now,  you can first look in there, which functions are already present. If you need something specific, you can always extend in your own source...

If you look into /playground/hawkeye/mbloopa/screen.c/h, you can see some functions I've written for this custom project to extend basic functionality - you can do the same. In there you will find for example font rendering with 16 grey levels, logo rendering and stuff... Just feel free to code what you need. The basic MIOS functions offer everything to put standard text/fonts/icons anywhere on the connected mios screens. I don't see a reason why you should not be able to display two different visuals on a single screen.

Best regards,

Peter

Link to comment
Share on other sites

Meanwhile i downloaded the code and did look here and there to get an idea.

I found the following relevant(?) docs

http://www.ucapps.de/mios32_c.html (MIOS32 C Interface)

http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftutorials%2F021_glcd%2FREADME.txt (Graphical LCD Output)

http://www.midibox.org/mios32/manual/group___m_i_o_s32___l_c_d.html (LCD functions)

 

Since i'll probably use Midibox NG i found this file interesting:

apps/controllers/midibox_ng_v1/src/mbng_lcd.c

Should contain all implemented LCD code for NG, right?

To me it looks like it mostly contains cursor based print to display code. Maybe all i need is to customize bitmap fonts and follow that approach. If not sufficient then look at MIOS32_LCD_BitmapPrint function.

In the end i have to get all the hardware stuff to test and play.

Edited by tago
Link to comment
Share on other sites

I'm not a good coder with much experience, but i'm trying :)

Currently i wonder about different types of OLEDs. I often see 0,96" (128x64) and that 2x40 (for the SEQ) here. The 2x40 seems not graphic but character based, so no custom fonts/graphics, right? Whats up with other sizes/formats graphic OLEDs? E. g. 256x64 or 128x32

Is mixing different types (pixel size/denses) of OLEDs possible when they have the same controller chip (SSD1306) on it or can you really only use one type simultaneously? I know that mixing LCDs and OLEDs is not possible.

I ask because it should fit perfectly in my frontpanel design. I'm not sure how a tiny a 0,96" OLED will look as a SCS/System display.

Edited by tago
Link to comment
Share on other sites

The 0.96" displays are really nice (hi-res thus sharp pixels) and really cheap. Most also have a carrier board meaning you could mount them easily. The one you found needs an FFC or 0.5mm pitch soldering, so go for the mounted option if you choose this route. 

I don't think that mixing display controllers is possible without special coding (works for example on MBCV).

As far as chaining multiple displays, I know @Hawkeye implemented this for the Programma v0.1

large.gallery_7895_68_21795.jpg.228d4cd0

 

My SCS-OLED boards will have a similar arrangement of rows of 4 OLEDs, which can be omitted in place of switches/an encoder.

 

Link to comment
Share on other sites

@tago tried to do my best to centralize infos in the wiki . But much information around , not always simple. Digging is also a part of the game =)
While you give yourself some time to understand things and to wait for answers, you're on a good path =)
Bests,
JK

  • Like 1
Link to comment
Share on other sites

1 hour ago, latigid on said:

I don't think that mixing display controllers is possible without special coding (works for example on MBCV).

Can you mix displays with the same controller chip but different resolutions? (e. g. 128x64 and 256x64 both ssd1322)

Would be a reasonably compromise.

Link to comment
Share on other sites

The SSD1322 controller works the same behind the display itself . Means connections stays the same , but only what differs is how you handle it trough software.
The concept with OLED is that each display require a specific CS line. Then other lines are serial chained .
I mean multiple SSD1306 connection schem could be also ok for multiple SSD1322 if i don't mess up myself. But then some coding work needed.
Be aware that graphical display consumes lot more CPU than classical text based displays, that might be the limiting factor in chaining SSD1322 Graphical OLEDs
Bests,
JK

Edited by Psykhaze
Link to comment
Share on other sites

3 hours ago, latigid on said:

My SCS-OLED boards will have a similar arrangement of rows of 4 OLEDs, which can be omitted in place of switches/an encoder.

How do 4 OLEDs work with one SCS? Is there a photo or video?

Edit: i mean a SCS consisting of multiple OLEDs. I've already learned that you can have multiple displays for different purposes.

Edited by tago
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...