+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2016
    Posts
    62

    Default SSD1315 oled display

    Hello folks,

    recently I bought a bunch of 128x64 and 128x32 I2c oled displays with SSD1306 driver, but after few try's I realized it came with different driver.
    The actual driver is SSD1315. I try get it worked with Richard's includes but no success. The displays not get initialised. In available "datasheets" I can't see any major differences.
    Then I tryed the displays with arduino and its includes (named as for SSD1306 and the displas works).
    If anyone has any suggestion how to deal with this SSD1315 driver displays in PBP, it will be great.

    Thanks,
    Louis

  2. #2
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    308

    Default Re: SSD1315 oled display

    Have you dissected the Audrino Include code? If you post it as .txt we could look at it with you.
    I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.

  3. #3
    Join Date
    Mar 2016
    Posts
    62

    Default Re: SSD1315 oled display

    I'm not familiar with arduino, in this case I grab the first include which I finded only for testing the displays.
    This arduino include says, its for SSD1306. I think my displays are SSD1306 only the seller (on aliex...s) in the description mislabelled them as SSD1315.
    Unfortunately the display's has no label or any other identifier.
    Even though I try them with Richard's includes and demos but the displays not getting to work.
    My setup is 16F1824 @8MHz hardware I2c, Vdd 5V, 4k7 pullups to SDA, SCL.
    Meanwhile I tried switch to soft I2c instead HW I2c, no success.
    Is there something special to set up in Richard's includes if the PIC run on 8Mhz instead 32MHz?

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    1,716

    Default Re: SSD1315 oled display

    Is there something special to set up in Richard's includes if the PIC run on 8Mhz instead 32MHz?
    nope

    there is a ssd1315 chipset it's said to be compatable with ssd1306 , i don't have one to test .
    i suspect the i2c address needs to be left shifted 1 bit to be a pbp address
    This is more entertaining than Free to Air TV

  5. #5
    Join Date
    Mar 2016
    Posts
    62

    Default Re: SSD1315 oled display

    i suspect the i2c address needs to be left shifted 1 bit to be a pbp address
    Thanks for reply Richard,
    this is not clear for me, what you mean i2c address needs to be left shifted 1 bit. How to do this? Sorry for that beginner question, can you be more specific.
    Here is the code, and config.
    I tried various combination of int osc frequencies from 4Mhz to 32Mhz, hardvare or software i2c, with or without pullups to SDA, SCL, no success.
    The displays are tested on arduino they are working.

    Code:
    '******************************************************************
    '*  Name    : SSD1306 OLED test                                   *
    '*  Author  : Louis                                               *
    '*  Notice  :                                                     *
    '*          : All Rights Reserved                                 *
    '*  Date    : 29. 5. 2019                                         *
    '*  Version : 1.0                                                 *
    '*  Notes   : 16F1824                                             *
    '*          :                                                     *
    '******************************************************************
    
    
    #CONFIG
      __config  _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_ON & _CLKOUTEN_OFF & _IESO_ON & _FCMEN_OFF
      __config  _CONFIG2, _WRT_OFF & _PLLEN_ON & _STVREN_ON & _BORV_19 & _LVP_OFF
    #ENDCONFIG
             
    DEFINE OSC 32     ; Use a 32 MHZ internal clock 
    OSCCON = %11110000
    
    TRISA = %000000   
    TRISC = %000000
    ANSELA  = 0 
    CM1CON0 = 0       ; Disable comparator 1
    CM2CON0 = 0       ; Disable comparator 2
    OPTION_REG.7 = 1  ; Disable weak pull ups
    
    char var byte
    x    var byte  
    y    var byte    
    BUFF VAR BYTE[16]
    ;use this define for hw i2c 
    #define hwi2c 1 
    #DEFINE PIC16 1 
    ;set and uncomment these to use softi2c
    'SCL var Portc.0      ' I2C Clock
    'SDA var Portc.1      ' I2C Data
    
    ;set these  to match display
    ssdheight con 7      ; 7 = 8 PAGES  64*128 ,  3 = 4 pages 32*128
    ssdwidth  con 127    ; 128 PIXELS WIDE
    sdd1306_addr con $78
    Include "ssd1306_I2C.inc"  ' bring it in
    include "font7x5_16.bas"
    
    '==========================    MAIN  Routine    ==============================
    
    gosub glcd_init
    BIG_TEXT = 0
    
    
    looper:
        GLCD_CLR
        GLCDDHL 0,0,75,1       ;x,y,len,patten
        GLCDDHL 0,2,75,128
        GLCDDVL 0,0,3           ;x,y,height [in pages]
        GLCDDVL 75,0,3
        ;GLCDSTR  5,1,"--SSD1306--"   ;x,y, cont string    PIC 18 ONLY
        ARRAYWRITE BUFF,["--SSD1306--",0]
        GLCDSTR  5,1,BUFF
        ARRAYWRITE BUFF,["ABCDEF",0]
        CHAR="!"
        GLCDC 100,1,CHAR             ;x,y , chr
        BIG_TEXT = 1
        if ssdheight > 3  then
            GLCDSTR  2,4,BUFF
            ARRAYWRITE BUFF,["@12456-=#",0]
            BIG_TEXT = 0
            GLCDSTR  2,7,BUFF          ;x,y ,str buffer [null terminated]
        else
            pause 1000
            GLCD_CLR
            GLCDSTR  2,0,BUFF
            ARRAYWRITE BUFF,["@12456-=#",0]
            BIG_TEXT = 0
            GLCDSTR  2,3,BUFF
        endif
        ;======================= live MCU indicator ====================
        high portc.3  ;led on portc.3
        PAUSE 1000
        low portc.3
        pause 1000
        ;======================= end of live MCU indicator =============
    GOTO looper
    
    END

  6. #6
    Join Date
    Mar 2016
    Posts
    62

    Default Re: SSD1315 oled display

    I don't know what happened, but after struggling around I tried use a different port. Instead port c.0 and c.1 I switched to c.4 and c.5 then to port a.4 and a.5 and the display start to work.
    The display work only with soft i2c, on all ports except for port c.0 and c.1 which is dedicated for hardware i2c on PIC16F1824.
    Display on port c.0 and c.1 not work in both modes HW or SW i2c.
    I cant find what is been wrong in my config. Probably the problem was there. Please can someone check my config what I missed to setup.
    btw. the displays are SSD1306 definitely.
    Last edited by louislouis; - 29th May 2019 at 21:53. Reason: readability

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    1,716

    Default Re: SSD1315 oled display

    port c pins 0 and 1 are still in analog mode , anselc=0 is needed

    Code:
    TRISC = 0000
    , may not work for hw_i2c , some some chip mssp modules req the pins set as input try
    Code:
    TRISC = 0011
    this is not clear for me, what you mean i2c address needs to be left shifted 1 bit. How to do this? Sorry for that beginner question, can you be more specific.
    arduino use a 7bit i2c address syntax pbp uses an 8bit address , to convert a 7 bit address to an 8bit addres you shift the bits left 1 bit

    eg most arduino ssd1306 modules have an address of 0x3c , 0x3c<<1= 0x78 the pbp address
    since arduino is more popular than pbp most things these days have a 7bit (arduino style) address printed on them [not all]
    This is more entertaining than Free to Air TV

  8. #8
    Join Date
    Mar 2016
    Posts
    62

    Default Re: SSD1315 oled display

    Thanks Richard for explanation. You're right, I forgot to set ANSELC = 0, then I added it, and the display start work on port c.0 and c.1 in SW i2c mode but still not with HW i2c mode.
    After your post, I set the port c.0 and c.1 to input mode and the HW i2c also start to work.
    Thanks Richard for help, also for the excellent job on SSD1306 includes.

Similar Threads

  1. Replies: 4
    Last Post: - 20th August 2016, 14:28
  2. OLED Display Noise problem
    By gunayburak in forum mel PIC BASIC Pro
    Replies: 24
    Last Post: - 5th July 2016, 10:15
  3. Help With OLED Display / 128X64 SSD1306
    By Denner in forum General
    Replies: 6
    Last Post: - 25th May 2013, 15:40
  4. Winstar OLED Display Problem with lcdout comands
    By bubbleless in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 4th May 2013, 13:11
  5. OLED 128x128 color display
    By Ron Marcus in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 21st May 2007, 01:45

Members who have read this thread : 14

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts