Menu

SDD1306 - 64*32 OLED

Anobium
2025-01-08
2025-04-05
  • Anobium

    Anobium - 2025-01-08

    New GLCD ... 12mm/0.49inches ... yep is is tiny

    Features:

    This GLVD is a 0.49 inches OLED display module of 64x32resolution OLED

    Working without backlight, the OLED display module works great.

    In low ambient light conditions such as a dark room, an OLED screen can achieve a higher contrast ratio than an LCD.

    The display with small dimension is suitable for MP3, function cellphone, smart health device, etc.
    Specifications:
    * Display Size: 0.49in
    * Resolution: 64*32
    * Text Color: White
    * Driver IC: SSD1306
    * Interface Type: IIC
    * Pin Quantity: 4Pin
    * Pixel Size: 0.155*0.155mm
    * Operating Temperature: -40~85℃
    * Working Voltage: 3.3V-5V

    Interface:

    GND: Ground
    VCC: Power supply+ 3.3~5V
    SCL: IIC clock
    SDA: IIC data

    Library

    Use the standard GLCD library with the GLCD_TYPE = GLCD_TYPE_SSD1306_64x32 All the standard GLCD commands are supported.

    Works great but very small.


    Some photos.



    Enjoy

     
    👍
    1

    Last edit: Anobium 2025-01-08
  • Roger Jönsson

    Roger Jönsson - 2025-03-19

    Got one of these and is eager to try it. First time with a GLCD.
    I can't find my USB-Serial thingy so I can't scan the I2C. I tried 0x78 and 0x3C without seeing any signs of life from it.
    Do you remember what I2C address yours had? If not, don't waste time finding out. I will wait for my new serial-thingy.

     
  • Roger Jönsson

    Roger Jönsson - 2025-03-19

    Hm... 0x78 vs 0x3C - 8 vs 7bit?

    Anyway. Is there more needed than this to get it started?

    #Chip 16F15376, 16
    #Option Explicit
    #include <glcd.h>
    
      ; ----- Define Software settings
      ' Define I2C settings - CHANGE PORTS
       #define I2C_MODE Master
       #define I2C_DATA PORTC.4
       #define I2C_CLOCK PORTC.5
       #define I2C_DISABLE_INTERRUPTS ON
       'Optionally, you can reduce the I2C timings.
       #define I2C_BIT_DELAY 0 us
       #define I2C_CLOCK_DELAY 0 us
       #define I2C_END_DELAY 0 us
    
      '''Define GLCD Hardware settings
       #define GLCD_TYPE = GLCD_TYPE_SSD1306_64x32 
      #define GLCD_I2C_Address 0x78
    
      GLCDPrint ( 0, 0, "Hello" )
    
     

    Last edit: Roger Jönsson 2025-03-19
  • Anobium

    Anobium - 2025-03-19

    I would go with this.

    You need the latest build for this tiny display.
    GCBASIC uses the 8bit address, so, 0x78 is the standard address.
    Try with two 4k pullup resistors in the DATA and CLOCK lines.

    Good to see someone using the library!

    #Chip 16F15376, 16
    #Option Explicit
    #include <glcd.h>
    
    #DEFINE GLCD_TYPE         GLCD_TYPE_SSD1306_64x32 
    #DEFINE GLCD_I2C_Address  0x78 
    
    // Define I2C Software settings
      #DEFINE I2C_MODE Master
      #DEFINE I2C_DATA    PORTC.4
      #DEFINE I2C_CLOCK   PORTC.5
      #DEFINE I2C_DISABLE_INTERRUPTS ON
    
    // Optionally, you can reduce the I2C timings.
      // #DEFINE I2C_BIT_DELAY 0 us
      // #DEFINE I2C_CLOCK_DELAY 0 us
      // #DEFINE I2C_END_DELAY 0 us
    
    // Commence Main program
      GLCDPrint ( 0, 0, "Hello" )
    
     
  • Roger Jönsson

    Roger Jönsson - 2025-03-19

    I did try with pullups.
    I have the "February 2023 (version 1.76)" "Update 1.76.2"
    The glcd.h is dated Jan 9.

    The terminal said with my code :
    GCBASIC (2025.02.15 (Windows 64 bit) : Build 1465)
    ...
    Finding source files:
    C:\GCstudio\gcbasic\include\glcd.h: found
    C:\GCstudio\gcbasic\include\glcd_ks0108.h: found

    Is that right? ks0108.h?


    Running your example now, I get Syntax Error:
    [{
    "resource": "/c:/GCstudio/gcbasic/include/glcd.h",
    "owner": "gcb",
    "severity": 8,
    "message": "Syntax Error (Library Include)",
    "source": "gcb",
    "startLineNumber": 1259,
    "startColumn": 1,
    "endLineNumber": 1259,
    "endColumn": 2147483647
    }]

    1259 : GLCDDrawChar GLCDPrintLoc, PrintLocY, LCDPrintData(GLCDPrint_String_Counter)

     
  • Anobium

    Anobium - 2025-03-19

    There is a release error. The build is missing a file update.

    My fault I had overlooked this specific file.

    So, to fix.

    Open GLCD.DAT in the include folder.
    Add at the bottom the followling line.
    38,GLCD_TYPE_SSD1306_64x32,glcd_ssd1306.h
    Save and Test - and let me know if this resolve.


    The GLCD.DAT file is the control file for the GLCD library. This line tells the compiler to load the correct library for this specific GLCD config.

     
  • Roger Jönsson

    Roger Jönsson - 2025-03-19

    That did it! Thanks!
    So happy to finally see the "hello" on the tiny screen.

     
    • Anobium

      Anobium - 2025-03-19

      So easy!! Sorry, for my little error. It will be fixed in the next release.

      Post a picture!!

       

      Last edit: Anobium 2025-03-19
  • Roger Jönsson

    Roger Jönsson - 2025-03-19

    Here it is!

     
    • Anobium

      Anobium - 2025-03-19

      So dinky!!

      DINKY: (of an object or place) attractively small and neat.


      I have a new project where I am embedded one of these.

      I was a pain to figure out how this little device worked but once I understood the memory map. I added the supporting code to handle the memory map. It was just same as the other SSD1306s.. just a lot smaller.

       
  • Roger Jönsson

    Roger Jönsson - 2025-03-19

    If I had the skills and time I would love to make a "Dinky Pong" game.
    (with two tiny paddles, of course).

    I made a simple bouncing pixel and the screen updates fast and smooth enough.

     
    👍
    1
  • Roger Jönsson

    Roger Jönsson - 2025-03-30

    Half way there. A tiny Pong Trainer test game. A pongish clone seems possible after all. I started making a bouncing ball inside the four walls. What a mess handling the ball bounce/directions and stuff. Now I opened up one wall, adjusted the ball direction/angles to suit pong and the wide screen (really, it is so...well...not wide... :) and then inserted a paddle controlled player. There are three angles per quadrant (not counting straight back and forth).

     

    Last edit: Roger Jönsson 2025-03-30
  • Anobium

    Anobium - 2025-03-30

    Impressive!!

     
  • Roger Jönsson

    Roger Jönsson - 2025-04-05

    Can I save memory by not loading fonts GLCDCHARCOL3.....7? Or how does that work?
    I only need to draw pixels (maybe lines).

    (TinyPong now has two players and sound. )

     
  • Roger Jönsson

    Roger Jönsson - 2025-04-05

    Duh! -By not writing any text the fonts are not loaded.

     
    👍
    1

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.