• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Tiva™ ARM® Microcontrollers » Tiva™ ARM® C Series Microcontrollers Forum » help on SSD1306 driver for Cortex M4
Share
Tiva™ ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS

help on SSD1306 driver for Cortex M4

help on SSD1306 driver for Cortex M4

This question is not answered
sherwin tiongson
Posted by sherwin tiongson
on Mar 07 2012 03:23 AM
Intellectual390 points

hi guys,

Good morning!!

I need to write a driver for our oled display so that we can use Stellaris Graphics Library to display characters and image to it. The OLED we are going to used is SSD1306. Can you guys point me if  there are existing documents that you think might help me. Right now I am looking for information regarding how the graphics library link/used the display drivers.. My development board right now is Stellaris EKL-LM4F232 (Cortex-M4) and our interface to the oled is SPI.

Thanks,

Sherwin Tiongson

Stellaris SPI StellarisWare example graphics display GPIO speed LCD RDK-IDM-SBC
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • cb1_mobile
    Posted by cb1_mobile
    on Mar 07 2012 08:20 AM
    Guru21670 points

    sherwin tiongson
    OLED we are going to use is SSD1306.

    Doubtful - more likely SSD device is Oled Control IC.  (which I have confirmed)

    Maker has "named" several of their Oled Display Assemblies "SSD1306!"  Certainly novel - although bit ineffectual/confusing.  Had we in Lcd field done such - there would be 10K+ Lcd variants - all with name HD44780.  (never even dawned on us to "name" the display module via IC nomenclature)

    TI supports several Oled displays on various Eval Boards.  Review of the SSD1306 "real" spec (that of the control IC) followed by study of the TI Oled offerings should be a productive beginning for you...

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • sherwin tiongson
    Posted by sherwin tiongson
    on Mar 13 2012 04:05 AM
    Intellectual390 points

    hi cb1 mobile,

    good day!!

    the controller chip SSD1306 from solomon systech.

    thanks

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dave Wilson
    Posted by Dave Wilson
    on Mar 13 2012 08:19 AM
    Mastermind22830 points

    I've not used an SSD1306 and have not read the datasheet but we do have a drivers for various SSD controllers already and one of these may be helpful as a base. The ones I can find and the kits they are included in are:

    • SSD1332 (ek-lm4f232)
    • SSD1300 (ek-evalbot)
    • SSD1329 (ek-lm3s8962, ek-lm3s6965 and ek-lm3s2965)

    You may also find this appnote on writing new display drivers helpful.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • cb1_mobile
    Posted by cb1_mobile
    on Mar 13 2012 08:43 AM
    Guru21670 points

    cb1_mobile
    TI supports several Oled displays on various Eval Boards.

    Great minds (true at least in your case) thinking somewhat alike...

    One caution perhaps - "fruit-based" display module producer - along with being tad "part name challenged" - may have interposed their own MCU and implemented some form of command interpreter - obviating any need for SSD read/mastery...  Incoherence in their naming scheme (multiple, different displays bearing identical SSD1306 name) caused me to flee their site...

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • sherwin tiongson
    Posted by sherwin tiongson
    on Mar 14 2012 09:10 AM
    Intellectual390 points

    Hi Dave,

    Good afternoon!!

    I already have a not fully working display driver for SSD1306. I was able to compile and link it to graphics library. But when I tried using GrStringDraw() function it displays not what I expect it... it displays filled rectangles in the screen. Even if I change to different strings. I'm kind of confident enough on my SD1306 library functions because I already tested each function and it really can execute the below functions as specified by the AN01287 document. Do you know where to find the source code for GrStringDraw() function? This would help me a lot so that I would know which display driver function is called by GrStringDraw().

    FYI.. I am using Stellaris EKL-LM4F232 Eval Board, my display is SD1306 OLED, interface is via SPI. One thing to note though is that in SD1306 we dont have capbility to read OLED controller memory so in my implementation I have a local display_buffer that is the replica of the oled's memory and just flush this buffer.

    void PixelDraw(void D ayData, long lX, long lY,   *pv ispl
                       unsigned long ulValue);
     
        void PixelDrawMultiple(void *pvDisplayData, long lX, long lY,
                               long lX0, long lCount, long lBPP,
                               const unsigned char *pucData,
                               const unsigned char *pucPalette);
     
        void LineDrawH(void *pvDisplayData, long lX1, long lX2,
                       long lY, unsigned long ulValue);
     
        void LineDrawV(void *pvDisplayData, long lX, long lY1,
                       long lY2, unsigned long ulValue);
     
        void RectFill(void *pvDisplayData, const tRectangle *pRect,
                      unsigned long ulValue);
     
        unsigned long ColorTranslate(void *pvDisplayData,
                                     unsigned long ulValue);
     
        void Flush(void *pvDisplayData);
     

    thanks,

    Sherwin Tiongson

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dave Wilson
    Posted by Dave Wilson
    on Mar 14 2012 09:54 AM
    Mastermind22830 points

    Sherwin,

     When drawing strings, GrLib uses the display driver's PixelDrawMultiple and LineDrawH functions. For PixelDrawMultiple, the lBPP parameter is always 1 so I would take a look at the code in that display driver function and see if your 1bpp case is working as expected. While you are working on this, make sure that you are testing with ASCII strings first since these should show up correctly with pretty much any font or codepage settings you happen to have. Once you get ASCII to display properly, you can be guaranteed that the display driver is fine and can then move on to dealing with other codepages, alphabets and fonts if necessary.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • sherwin tiongson
    Posted by sherwin tiongson
    on Mar 14 2012 12:05 PM
    Intellectual390 points

    hi Dave,

    Good day!

    When GrLib calls PixelDraw(void D ayData, long lX, long lY,   *pv ispl,unsigned long ulValue) function, do you happen to know what value would he passed when he wants to display white or any color?  is there any documents you can recommend describing color-mapping in GrLib? I am concern on this because my OLED is monochrome. I think this is the source of my   

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dave Wilson
    Posted by Dave Wilson
    on Mar 14 2012 12:16 PM
    Mastermind22830 points

    There's some information on color handling in this app note which discusses creating new display drivers. The color you are passed in ulValue here is the value your driver returned on a previous call to the ColorTranslate() function. It is up to your driver to decide how it handles colours - ColorTranslate will be passed a 24 bit RGB value and it must return a value that it can use later to represent that color on the display. For a monochrome display, you may want to return "1" for any color value other than 0 (black) or you may like to pick some threshold and return 1 (on) for colors above the threshold and 0 (off) for colors below it.

    (Edit: Added missing hyperlink to the app note)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • sherwin tiongson
    Posted by sherwin tiongson
    on Mar 16 2012 09:40 AM
    Intellectual390 points

    got it working.. thanks guys for your great support..

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use