Menu

GLCD: SSD1331 Device Driver released.

Anobium
2017-12-10
2018-01-13
  • Anobium

    Anobium - 2017-12-10

    Great Cow BASIC now supports the SSD1331 GLCD.

    The display is a 96 * 64 Color OLED. The driver supports the SPI (hardware and software) mode and all the Great Cow BASIC commands for GLCD and Rotate etc with support for both legacy and OLED fonts!

    The GLCD tested is a 1 Inch 96 * 64, color OLED with SPI support. Suitable for PIC and AVR. This support software data transfer requiring 6 ports in total. Typically operates at VCC 5 but always check voltage specifications.

    A Very nice display for cost and performance

    You will need to update your system with an updated GLCD and a new SSD1331 library.

    Enjoy.

     
  • Anobium

    Anobium - 2017-12-10

    Just posted the demonstration code I used to GitHub. See here: https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/find/master

    If you enter SSD1331 in the dialog (after the Great-Cow-BASIC-Demonstration-Sources / )... this will show you the SSD1331 demo.

     
  • Anobium

    Anobium - 2017-12-11

    Also, I have posted the otherdemonstration I use to the test the display.

    Posted the demonstration code to GitHub. See here: https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/find/master

     
    • Anobium

      Anobium - 2017-12-13

      The driver does not have scroll or cut/paste implemented. The functions are present but someone else can complete these relatively simple methods.

       
  • bed

    bed - 2017-12-11

    You are too fast for me, did receive this Display, but got never my hand on it.
    Thank You. You're the fastest Guy of the Universe.

     
    • Anobium

      Anobium - 2017-12-11

      :-) Not really. Took about six hours to develop and10 mins to do the documentation.

      It is a really nice display.

      Development issues that most would have given up on.
      GLCDCLS is a hardware clear.. as there is no data out from the device - i hed to resolve memory being corrupted by the the next command. And, to resolve the issues withh respect to Rotation.
      Rotation is only implemented for 180 degree. So, I added a software rotation
      Filled routines could be in hardware but again there is no data out from the device - revert to standard approach
      Updated commands to send mutiple commands... this device has a very odd protocol
      Hardware commands in exhanced more use a three byte color protocol whilst the standard model commands use a two byte RGB color byte - go figure this one!

      But, it was relatively easy as it gets easier every time.
      OLED fonts worked 'out of the box', as did the old GLCD fonts but you do need OLED fonts.
      GCLD public methods all work unchanged. Line..circle... box etc.

       
  • stan cartwright

    stan cartwright - 2018-01-09

    I emailed you the demo works fine.
    Dunno about colour,there's rgb and bgr but the colours aren't as vivid as a phone's anyway.

        writeCommand(SSD1331_CMD_DISPLAYOFF);   // 0xAE
        writeCommand(SSD1331_CMD_SETREMAP);     // 0xA0
    ;#if defined SSD1331_COLORORDER_RGB
        writeCommand(0x72);             // RGB Color
    ;#else
    ;    writeCommand(0x76);                // BGR Color
    ;#endif
    
     
    • Anobium

      Anobium - 2018-01-09

      You emailed a programming error. Not sure what you mean.
      Please post to the Dev Forum please

       
    • Anobium

      Anobium - 2018-01-10

      @Stan

      Sorry, what does this mean?

      you have inverted color control. can you share why?

      Do we need to add some capability? why?

      Evan

      On 09 January 2018 at 19:07 stan cartwright stanleyella@users.sf.net wrote:

      I emailed you the demo works fine.
      Dunno about colour,there's rgb and bgr but the colours aren't as vivid as a phone's anyway.
      ~~~
      writeCommand(SSD1331_CMD_DISPLAYOFF); // 0xAE
      writeCommand(SSD1331_CMD_SETREMAP); // 0xA0
      ;#if defined SSD1331_COLORORDER_RGB
      writeCommand(0x72); // RGB Color
      ;#else
      ; writeCommand(0x76); // BGR Color
      ;#endif
      ~~~

       

      Last edit: Anobium 2018-01-10
  • stan cartwright

    stan cartwright - 2018-01-10

    I hadn't looked at the gcb include then, just arduino c stuff.

    "Hardware commands in exhanced more use a three byte color protocol whilst the standard model commands use a two byte RGB color byte - go figure this one!"

    Other ili displays that gcb supports use 24 bit values for colour but you sorted it for 16bit.

    Sorry, I thought there relevent references to colour values from quick look but wrong.

     
    • Anobium

      Anobium - 2018-01-12

      I am assuming that the library works ok. Yes.

      I hadn't looked at the gcb include then, just arduino c stuff.

      "Hardware commands in exhanced more use a three byte color protocol whilst the standard model commands use a two byte RGB color byte - go figure this one!"

      Other ili displays that gcb supports use 24 bit values for colour but you sorted it for 16bit.

      Sorry, I thought there relevent references to colour values from quick look but wrong.

       
  • stan cartwright

    stan cartwright - 2018-01-12

    Yes, well the demo does and that uses most functions so I assume it's all fine.

     
  • stan cartwright

    stan cartwright - 2018-01-12

    I tried just glcdcls then end and it does cls. There's a vertical line,

        #chip mega328p, 16
        #option explicit
    
        #include <glcd.h>
        #include <UNO_mega328p.h >
    
        #define GLCD_TYPE GLCD_TYPE_SSD1331
    
        'Pin mappings for SPI - this GLCD driver supports Hardware SPI and Software SPI
        #define GLCD_DC       DIGITAL_8         ' Data command line
        #define GLCD_CS       DIGITAL_10          ' Chip select line
        #define GLCD_RESET    DIGITAL_9         ' Reset line
    
        #define GLCD_DO       DIGITAL_11          ' Data out | MOSI
        #define GLCD_SCK      DIGITAL_13          ' Clock Line
    
        #define SSD1331_HardwareSPI    ' remove/comment out if you want to use software SPI.0
    
        'GLCD selected OLED font set.
        #define GLCD_OLED_FONT
        #define GLCD_PROTECTOVERRUN
        GLCDfntDefaultsize = 1
    
        GLCDCLS  ' supports GLCDBackground as default
        'GLCDCLS  also support passing color parameter.
        'GLCDCLS [color]
    '    GLCDRotate ( Landscape )
    end
    
     
  • stan cartwright

    stan cartwright - 2018-01-12

    same line if I move end further down.

        GLCDSetContrast ( 0x80 )
        SetPowerMode_SSD1331(0x1A)                    'Explicit commmands for this device
        SetBrightness_SSD1331( 0xFF )                 'Explicit commmands for this device - full brightness
    end
    
     
  • stan cartwright

    stan cartwright - 2018-01-12

    The line is still there after

        GLCDPrintStringLN "Great Cow BASIC"
        GLCDPrintStringLN ""
        GLCDPrintStringLN "November 2017"
        GLCDPrintStringLN "SSD1331 GLCD"
        GLCDPrintStringLN ""
        GLCDPrintStringLN "by Anobium"
        wait 5 s
    

    Then it dissappears. Where/when/why

     
  • Anobium

    Anobium - 2018-01-13

    I have just tried your code on my device. No line, no error.

    Looking at your photo - the line is not active pixels from a programming event - this looks like some sort of error with the onboard chip - why? at no point are we able to vary the pixel intensity and the photo shows a line that has lowering intensity from top to bottom.

    And, if the line was at one end of the display then then would have made sense.

    Looks like a faulty OLED to me.

     
  • stan cartwright

    stan cartwright - 2018-01-13

    Today the line is constant from top of screen to bottom.
    Guess it's faulty then. Bollards!
    Thanks for examining. Sorry if I've wasted your time.

     
    • Anobium

      Anobium - 2018-01-13

      That is unfortunate. As least we have a driver. Look on the brightside - you can return and get another. I have returned many devices and not had any issue apart from the time impact.

       
  • stan cartwright

    stan cartwright - 2018-01-13

    Back to China and pay postage isn't viable but as you say another driver and the line is only visible in some colour back grounds..can't see it with green back ground.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.