ssd1306 Include Question


+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2024
    Posts
    39

    Default ssd1306 Include Question

    Greetings,

    Have been using Richard's include for the SSD1306 (32*128) display with sucess.
    I was now trying to display a single dot which would move on the display according to an X and Y coordinate variable.

    Using the command GLCDDHL 0,0,1,1 works to display a single dot and for a fixed X and Y value but not if I want to use something like Xvar and Yvar.

    How can I do this?

    Thanks

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,726


    Did you find this post helpful? Yes | No

    Default Re: ssd1306 Include Question

    I was now trying to display a single dot which would move on the display according to an X and Y coordinate variable.
    The ssd1306 has no support for setting individual pixels because the smallest write sets 8 pixels as a minimum and the i2c versions have no method to read back displayed data.
    so my small footprint models that have no display buffer cannot support single pixel writes in any practical way

    the fully buffered graphics versions can do it easily.
    gl_setdot: 'Set a pixel to colour given gl_x,gl_y
    ie set a pixel @30,33 and clear pixel at @31,33
    Code:
    gl_y=33
    gl_x=30
    colour=1
    gosub gl_setdot
    gl_x=31
    colour=0
    gosub gl_setdot
    gosub show
    Warning I'm not a teacher

  3. #3
    Join Date
    Jul 2024
    Posts
    39


    Did you find this post helpful? Yes | No

    Default Re: ssd1306 Include Question

    Thanks Richard for your reply,

    I was trying to do something like the image attached where it's used one of the small SSD1306 displays.
    Is there a workaround to do something like this?

    Name:  ssd1306_osc.jpg
Views: 8
Size:  21.3 KB
    Last edited by PaulMaker; Today at 08:48.

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,726


    Did you find this post helpful? Yes | No

    Default Re: ssd1306 Include Question

    There is no workaround needed. Use the full feature version
    Warning I'm not a teacher

  5. #5
    Join Date
    Jul 2024
    Posts
    39


    Did you find this post helpful? Yes | No

    Default Re: ssd1306 Include Question

    Sorry Richard...I think i'm a bit confused...

    I'm currently using the includes:

    ssd1306_I2C.INC
    font7x5_18.bas

    Which should i add or replace?

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


    Did you find this post helpful? Yes | No

    Default Re: ssd1306 Include Question

    Look at topic "graphical displays with pbp"
    Warning I'm not a teacher

  7. #7
    Join Date
    Jul 2024
    Posts
    39


    Did you find this post helpful? Yes | No

    Default Re: ssd1306 Include Question

    Was checking that exact post

    From what i could see, i removed my previous includes and added the following:

    Code:
      
      #DEFINE colours 1   ;1 mono 2 rg or 3 rgb    width  con 128      
        height con 32      
        
        include "grx.pbpMOD" 
        include "SSD1306.pbpMOD"
        include "font.bas"
        include "bignum.bas"       
        include "bigchr.bas"
    While compiling for the 18F2580, i get the error "WHILE SSP1STAT.2 = 1 : WEND ; SSPSTAT = 1 Transmit in progress" (line that is in the SSD1306.pbpMOD file).

    I'm guessing that it's because the 18F2580 does not have the SSP1STAT.

    Same thing happens with the line SSP1CON2 "While SSP1CON2.6 = 1 : WEND ; Wait for Acknowledge from slave".

    Should I replace it with SSPSTAT.2 and SSPCON2 or just delete these 2 lines?

Similar Threads

  1. SSD1306 INCLUDE for PBP3
    By richard in forum PBP3
    Replies: 101
    Last Post: - 23rd February 2024, 18:47
  2. SSD1306 Inverse screen example?
    By wjsmarine in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th January 2024, 04:20
  3. About 0.96" 128x64 SSD1306
    By cesar35 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th January 2022, 13:10
  4. SSD1306 Include example
    By timc in forum Code Examples
    Replies: 11
    Last Post: - 28th November 2017, 08:53
  5. Question on include files and problem with serial LCD/USB program
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 10th August 2012, 12:03

Members who have read this thread : 5

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