SSD1306 INCLUDE for PBP3


Closed Thread
Results 1 to 40 of 102

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: SSD1306 INCLUDE for PBP3

    looks like a 4550 just hasn't the resources for graphics work

    here is a look a my 16x16 pawn font on a 26k22
    Name:  pawns.jpg
Views: 3202
Size:  324.8 KB

    its still a bit clunky @ 16x16

    bmp 48x51
    Name:  bmpp.jpg
Views: 3300
Size:  477.6 KB
    Last edited by richard; - 27th December 2021 at 05:07.
    Warning I'm not a teacher

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: SSD1306 INCLUDE for PBP3

    The thing is getting more and more complicated...

    I am considering to switch over to a 3,5" Nextion display. Much easier, preloaded images. Even a 12F could handle that! Still I have to use the USB port, so 4550 is the least to use.

    The last try of 48x51 looks great! I do not care about white or black pieces or even the board. White pieces is just fine. But if the resources needed are too much, I don't know if it is worth to keep on trying...

    Thanks a lot for the efforts,
    Ioannis

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: SSD1306 INCLUDE for PBP3

    Bitmaps take very modest resources, that one just 48 x 8 bytes of flash
    Warning I'm not a teacher

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: SSD1306 INCLUDE for PBP3

    That is nice! Is there any post on the forum how this can be done?

    This needs 2304 bytes for 6 pieces and I think this can be managed.

    Ioannis

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: SSD1306 INCLUDE for PBP3

    LCDAssistant.exe
    GLCDtool.exe

    will get you close [keep height to multiple of 8]
    Warning I'm not a teacher

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: SSD1306 INCLUDE for PBP3

    found this example

    Code:
     '****************************************************************
    '*  Name    : ssd1306_DEMO.PBP                                   *
    '*  Author  : richard                                            *
    '*  Notice  :                                                    *
    '*          :                                                    *
    '*  Date    : 19/11/2017                                         *
    '*  Version :                                                    *
    '*  Notes   :                                                    *
    '*          :FOR pic 18F26K22              SSD1306               *
    '****************************************************************
    #CONFIG
      CONFIG  FOSC = INTIO67
      CONFIG  PLLCFG = OFF
      CONFIG  PRICLKEN = OFF
      CONFIG  FCMEN = OFF
      CONFIG  IESO = OFF
      CONFIG  PWRTEN = OFF
      CONFIG  BOREN = SBORDIS
      CONFIG  BORV = 190
      CONFIG  WDTEN = ON
      CONFIG  WDTPS = 32768
      CONFIG  CCP2MX = PORTC1
      CONFIG  PBADEN = OFF
      CONFIG  CCP3MX = PORTB5
      CONFIG  HFOFST = ON
      CONFIG  T3CMX = PORTC0
      CONFIG  P2BMX = PORTB5
      CONFIG  MCLRE = EXTMCLR
      CONFIG  STVREN = ON
      CONFIG  LVP = OFF
      CONFIG  XINST = OFF
      CONFIG  DEBUG = OFF
      CONFIG  CP0 = OFF
      CONFIG  CP1 = OFF
      CONFIG  CP2 = OFF
      CONFIG  CP3 = OFF
      CONFIG  CPB = OFF
      CONFIG  CPD = OFF
      CONFIG  WRT0 = OFF
      CONFIG  WRT1 = OFF
      CONFIG  WRT2 = OFF
      CONFIG  WRT3 = OFF
      CONFIG  WRTC = OFF
      CONFIG  WRTB = OFF
      CONFIG  WRTD = OFF
      CONFIG  EBTR0 = OFF
      CONFIG  EBTR1 = OFF
      CONFIG  EBTR2 = OFF
      CONFIG  EBTR3 = OFF
      CONFIG  EBTRB = OFF
    #ENDCONFIG
    DEFINE OSC 64 
    
    char var byte
    x    var byte  
    y    var byte    
    BUFF VAR BYTE[16]
    NCO_INT     VAR WORD        
    
    
    OSCCON = %01110000           
    ANSELb = 0
    ANSELA = 0
    ANSELC = 0
    OSCTUNE.6=1
    ;use this define for hw i2c 
    #define hwi2c 1 
    
    ;set and uncomment these to use softi2c
    'SCL var PortC.3      ' I2C Clock
    'SDA var PortC.4      ' 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_18.bas"
     
    
    gosub glcd_init
    BIG_TEXT = 0
    
    
    looper:
        GLCD_CLR 
        SSDBM 30,0,64,64 ,kooka
        PAUSE 1000         
        GLCD_CLR 
        SSDBM 30,0,61,64 ,surfer64
        PAUSE 1000                 
        GLCD_CLR 
        SSDBM 30,0,64,64 ,lizard64
        PAUSE 1000 
    
        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
        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
        PAUSE 1000
    GOTO looper
    
    END
    kooka:
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 128
    @ db 224, 240, 248, 248, 248, 248, 252, 220, 220, 220, 220,  28,  28,  28,  28,  28
    @ db 124, 248, 248, 248, 240, 192, 128,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,  64, 224, 240, 240, 216, 248, 248, 232, 236, 172, 183
    @ db 183, 183, 183, 159, 191, 191, 159,  31,  63,  63,  28,  62,  62,  63,  28,  28
    @ db 0, 128, 225, 255, 255, 255, 255, 124,   0,   0,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   1,   1,   1,   1,   1,   1,   0,   0
    @ db 0,   0,   1,   3,  15,  63, 143,   0,   0,   0,   0,   0,   0, 140,  30, 214
    @ db 231, 227, 243, 251, 249, 252, 252, 252, 254, 254, 255, 124, 240, 240, 192,   0
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   0, 128, 128, 128,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   3,  15, 248, 128,   6,  62, 255, 255, 191, 191, 255
    @ db 207, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
    @ db 252, 128,   0,   0,   0,  24, 248, 252, 255, 255,  15,   7,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   0,   0, 192, 112, 248, 248, 248, 248, 248, 248, 254
    @ db 254, 254, 254, 246, 254, 252, 248, 193,  15,  30, 252, 240, 225, 199, 207, 158
    @ db 63, 127, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
    @ db 255, 255, 254,  62,  30,  31,  31,  15,  15,  15,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   3,   3,  31,  31,   7,   7,  15,  63
    @ db 127,  63,   7,  15,  15, 127, 255, 247, 198, 192, 248, 124,  29,  31, 159, 159
    @ db 223, 254, 252, 253, 249,  51, 247, 239, 255, 255, 255, 255, 255, 255, 255, 255
    @ db 255, 255, 255, 255,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0, 224, 127,  15, 128, 224, 248, 252, 127,  31,  15,  15
    @ db 7,   7,   7,   7,   3,   0,   0,   0,   0,   3,  63, 254, 255, 255, 125, 251
    @ db 255, 223, 222, 254, 206, 224, 128,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0   
    @ db 0,   0,   0,  12,  31,  63, 112, 252, 255, 127,  31,   1,   0,   0,   0,   0   
    @ db 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   7,  63, 126, 127 
    @ db 127, 255, 189, 223, 255,  55,  31,   0,   0,   0,   0,   0,   0,   0,   0,   0  
    
    
    surfer64 :
    @ db   0,   0,   0,   0,   0,   0,    0,    0,   0,   0,   0,   0,   0,   0,    0 , 252 
    @ db   254, 254, 255, 254, 254, 254,  16,   0,   0,   0,   0,   0,   0,   0,    0,   0
    @ db   0,   0,   0,   0,   0,   0,    0,    0,   0,   0,   0,   0,   0,   0,    0,   0
    @ db   0,   0,   0,   0,   0,   0,    0,    0,   0,   0,   0,   0,   0,   0,    0,   0
    @ db   0,   0,   0,   0,   0,   0,    0,    192, 224, 240, 248, 252, 248, 255,  255, 255
    @ db   255, 253, 249, 240, 248, 240,  240,  224, 224, 192, 192, 192, 192, 192,  128, 192
    @ db   128, 192, 128, 192, 192, 192,  192,  192, 0,   0,   0,   0,   0,   0,    0,   0   
    @ db   0,   0,   0,   0,   0,   0,    0,    0,   0,   0,   0,   0,   0,   0,    0,   0 
    @ db   0,   128, 252, 255, 95,  15,   7,    63,  255, 255, 255, 255, 255, 255,  255,  63  
    @ db   31,   2,   0,   0,   1,   1,   1,   1,   1,   3
    @ db   1,   3,   1,   1,   1,   1,   1,   1,   1,   1,   1,   0,   0,   0,   0,   0  
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 
    @ db   0,   0,   0,   0,   0,   0,   0, 170, 255, 255, 225, 128,   0,   0, 253, 255
    @ db   255, 255, 255, 255, 255, 240, 192, 192, 128,   0,   0,   0,   0,   0,   0,   0
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   3,   3,   1,   0,   0,   0,   1,   3,   7
    @ db   7,  31,  63, 127, 255, 255, 255, 255, 255, 254, 252, 240, 224,   0,   0,   0 
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 
    @ db   0,   0, 192, 192,   0, 112, 240, 240,   0,   0,  96, 184,  28, 224, 192, 128, 224 
    @ db   224,   0,   0,  84, 255, 255, 255,  31,   1,   7,  63, 127, 255, 255, 248,  64  
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 
    @ db   16,  16, 145, 147,  83, 182, 117, 165,  53,  43,  77, 106, 235, 227, 231, 252, 243 
    @ db   239, 240, 224, 255, 255, 255, 193, 192, 192, 192, 128, 192, 131, 223, 255, 255, 248
    @ db   192, 128,   0, 128,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 
    @ db   0,   0,   4,  14,   6,   6,   6,   6,   5,  13,  29,  26,  22,  22,  21,  21,  21  
    @ db   21,  21,  13,  91, 123,  87,  87,  87, 215,  87, 255,  87, 255,  87, 207,  95, 191 
    @ db   223, 159, 159, 159,  95, 159,  95, 127,  95,  95,  95,  95,  95,  79,  87,  47,  23 
    @ db   27,  27,   9,   5,   4,   4,   4,   4,   4,   4
    
    lizard64  :
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   192 
    @ db   0,   0, 192,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0  
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   248, 128, 253, 192 
    @ db   112, 158,  65, 32,  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db   0,   0,   0,   0,   0,   0,   0,   128, 192, 224, 248, 224, 80,  88,  76,  32  
    @ db   16,  0,   0,   128, 192, 224, 240, 240, 240, 248, 252, 60,  16,   0,  0,   0 
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   17, 127, 127,  127 
    @ db   127, 105, 116, 240, 240, 248, 248, 248, 248, 152, 128, 192, 192, 192, 192, 224 
    @ db   192, 224, 228, 238, 255, 255, 255, 255, 253, 251, 251, 241, 241, 241, 241, 248 
    @ db   248, 252, 124,  63,  31,  15, 7,   7,   7,   3,   1,   0,   0,   0,   0,   0 
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   128, 192, 224, 240, 240 
    @ db   248, 252, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
    @ db   127, 63,  63,  63,  63,  63,  31,  31,  31,  15,  95,  255, 255, 255, 223, 207 
    @ db   195, 128, 128, 128, 192, 160, 128, 128, 128, 128, 0,   0,   0,   0,   0,   0 
    @ db   0,   0,   0,   0,   0,   128, 240, 248, 252, 254, 127, 31,  15,  7,   7,   3   
    @ db   1,   1,   1,   0,   6,   7,   7,   7,   7,   15,  31,  31,  31,  63,  31,  63  
    @ db   21,  23,  21,  21,  21,  20,  20,  20,  20,  0,   0,   0,   0,   0,   1,   1   
    @ db   1,   3,   3,   7,   15,  31,  39,  14,  3,   10,  2,   0,   0,   0,   0,   0 
    @ db   0,   0,   0,   224, 255, 255, 255, 15,  1,   0,   0,   0,   0,   0,   0,   0   
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0   
    @ db   0,   0,   0,   128, 192, 96,  96,  48,  16,  16,  16,  8,   0,   0,   0,   0  
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0 
    @ db   0,   0,   0,   0,   7,   63,  127, 248, 240, 192, 192, 128, 0,   0,   0,   0   
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   128, 192, 192, 64,  96,  48,  24 
    @ db   28,  6,   7,   3,   1,   0,   0,   0,   0,   0,   0,   0,   0,   6,   6,   0   
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   1,   1,   1,   3,   7,   3,   7,   6   
    @ db   7,   6,   7,   6,   7,   3,   7,   3,   3,   1,   1,   0,   0,   0,   0,   0   
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0   
    @ db   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
    Warning I'm not a teacher

  7. #7
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: SSD1306 INCLUDE for PBP3

    Got some genuine, 128x128 pixels, 16 shades of grey, OLED displays from Futaba. They use SSD1327. Any chances to adapt all above to that controller?

Similar Threads

  1. SSD1306 Include example
    By timc in forum Code Examples
    Replies: 11
    Last Post: - 28th November 2017, 08:53
  2. SSD1306 start display problem
    By harryweb in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th December 2016, 19:16
  3. Using INCLUDE to add a text file in PBP3
    By Sumobob in forum PBP3
    Replies: 4
    Last Post: - 16th May 2016, 18:56
  4. PBP3 to include 18F97J94?
    By fowardbias in forum PBP3
    Replies: 1
    Last Post: - 18th December 2013, 16:42
  5. Help With OLED Display / 128X64 SSD1306
    By Denner in forum General
    Replies: 6
    Last Post: - 25th May 2013, 15:40

Members who have read this thread : 7

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