GUIX and SSD1306

Hi, I have a popular monochrome 128x64 OLED display (SSD1306) and need to implement a menu on it, similar to an MP3-player (on Synergy). I'd like to do this with GUIX, would that be feasible? 

Also, would it make sense, or is it a necessary to use a larger display, with more resolution, say 320x240? 


  • I might add that I am totally new to Synergy/GUIX :)

  • In reply to fail:


    You should be able to use this display with GUIX, but you will need to do some adjustments and write/port the driver to communicate with the display via I2C. GUIX renders its frames in RAM, but you can get access the callback function that will let you update the display once something has changed on screen. Getting monochrome buffering can be a bit tricky, especially since current GUIX Studio version cannot generate resources that use less than 8 bits per pixel. Also, since you're outputting through serial interface, you won't be able to use GUIX Adaptation framework, D/AVE2D and JPEG Decoder.

    Have a look at the following project: Inside gui_thread_entry.c, there's an app_display_refresh function that's called every time rendering is finished inside GUIX. You can use it to push the data through the I2C to your display.


  • In reply to Karol:

    that seems to be the exact reply I needed :)

    except maybe someone here has experience with the SSD1306 interface or writing a (SPI-) driver. anything is welcome. 

    with regard to your reply:

    > current GUIX Studio version cannot generate resources that use less than 8 bits per pixel

    two questions:

    - will this change (anytime soon)?

    - I presume I can make (convert) the graphics needed using a graphics package, so the real problem would be creating a resource file from them. how to go about doing that? 

    I'll be having a workshop soon, but it may be interesting to have the answers available here. 

  • In reply to fail:


    The g_lcd_spi_callback function is only used for flow control during the LCD initialization. The display itself is driven directly from the Graphic LCD controller using 16-bit interface. The callback function you're looking for is (in my project) app_display_refresh(). In the example I provided, I do some bit order manipulation and copy from write to read buffer - your application can fully replace that with I2C transaction for pixel drawing (where g_display_fb_background[0] is the base of the monchrome frame buffer rendered by GUIX).

    As for sub-byte resource generation, I'm not sure if the upcoming GUIX Studio release implements it, however my project includes an additional function that draws 8bpp bitmaps onto 1bpp canvas (assuming your color table only has 2 entries) - you can see it being used when rendering the splash screen. If you'd like to read your images from different source (i.e. byte array produced using some other utility), you may not be able to use GUIX image-drawing API as GUIX relies on the table of pixelmaps (and specific bitmap format) which is produced using GUIX Studio (however as emphasized above, you can look at the app_gx_display_driver_pixelmap_draw function that's invoked every time a pixelmap is drawn, to implement your own function for this purpose).


  • In reply to Karol:

    Hey Karol,

    Any update to the "> current GUIX Studio version cannot generate resources that use less than 8 bits per pixel" statement? I see in GUIX Studio the support for 1bpp, but does it really store it that way, or is it not quite so nice? Also, my controller is an el-cheap-o monochrome display that does things in pages and columns. Does GUIX support this format?
  • In reply to wflynn:

    Hello wflynn,

    the lowest selectable bpp seems to be still 8. Although the bpp values lower than 8 are shown initially as available, they get grayed out as soon as one tries to select any of them. Tried that in GUIX Studio

    Best regards,

  • In reply to anper:

    Turns out if you unselect Synergy as the target CPU, you can select 1bpp. You lose the ability to use the Synergy specific hardware acceleration under Advanced Settings, but it still works.