Shop OBEX P1 Docs P2 Docs Learn Events
Sabernetics uOLED 96x16 pixel I2C display ANYONE??? — Parallax Forums

Sabernetics uOLED 96x16 pixel I2C display ANYONE???

xanatosxanatos Posts: 1,120
edited 2014-03-25 11:40 in General Discussion
Has no one on this forum played with this little guy yet?

http://sabernetics.com/store/0-84-oled-display-96x16/

Comments

  • MacTuxLinMacTuxLin Posts: 821
    edited 2012-11-04 02:14
    The smallest I've & am working with is the uOLED 96x64.... Can't think of any project that uses such small display....MP3/OGG player display?
  • xanatosxanatos Posts: 1,120
    edited 2012-11-04 06:06
    Hi,

    Thanks for the response. It's for a working sonic screwdriver, actually :-) After that, who knows, but it's a fun project to start off with for this display.

    All I'm really looking for is the byte sequence this thing needs to initialize and display. I've got the SSD1306 controller info, but for some reason I'm just not seeing the byte string in there that I should be sending to this item to get it to do anything. The display remains blank no matter what strings I send via I2C.

    I'm thinking that the initialization, contrast, brightness and pixel codes are probably the same between your 96x64 and my 96x16 if they both use the SSD1306 chip as I understand. Would you be willing to share the string you send to your device? Something along the lines of $A0, $85, ... ??? It looks like it needs a few initialization bytes before data can actually be displayed, but so far, no luck. I've even tried to pick through some Arduino code for this thing, but all I can see is it setting up varaible values that it then hands off to a file called wire.h which appears to be a default part of the Arduino development environment, which I don't have and I can't seem to find a code listing for wire.h, so... I'm still looking.

    If you've got a working string of data for me to try... I'd sure appreciate it. Maybe once I see what it needs I can finally decode where the info is in this "manual"...

    Thanks very much,

    Dave
  • MacTuxLinMacTuxLin Posts: 821
    edited 2012-11-04 06:17
    Hey Dave,

    I'm actually using this display. I have my own driver for my controller but there a number of drivers in obex (e.g. by ravenkeller) for this.

    I took a brief look at the datasheet & it seems both the SDA & SCL are pulled up to 5v? Are you connecting this with a voltage level translator ?
  • xanatosxanatos Posts: 1,120
    edited 2012-11-04 07:14
    Hi,

    Thanks for the OBEX link - I downloaded the ravenkeller files and found that there was a great SPIN file in there that really spells out the register names, hex addresses and startup values. These things take a LOT of code to get them even ready to display! I've been using mostly serial LCD displays, so this is something of a leap for me :-) I was expecting perhaps four or five initialization parameters, not 30! :-) Plus it's even picky about shutdown, apparently you can't just switch off power to the thing without risk unless you perform teh shutdown routine first.

    Much to sort through on this one, but I think you've given me a good direction in which to start, thanks very much!

    Dave
  • MacTuxLinMacTuxLin Posts: 821
    edited 2013-07-19 04:34
    Did you managed to get this working, by the way?
  • xanatosxanatos Posts: 1,120
    edited 2013-08-03 09:42
    MacTuxLin wrote: »
    Did you managed to get this working, by the way?

    Not yet - got too busy with major projects/installs. I still have the unit and I'm hoping to get it running sometime this fall...
  • SaberneticsSabernetics Posts: 1
    edited 2013-08-22 11:27
    Hey guys I developed the Sabernetics OLED display, I have online at my product page http://sabernetics.com/store/0-84-oled-display-96x16/ datasheets and source code (w/graphics library for Arduino and GCC) that is is designed for this display. In a nutshell the SSD1306 requires initiating a new I2C stream for each command.
    void SSD1306_Write_Command(unsigned char data) {
    
        I2CMasterBuffer[0] = SSD1306_ADDR;
        I2CMasterBuffer[1] = 0x00;
        I2CMasterBuffer[2] = data; /* Data0 */
        TWI_Start_Transceiver_With_Data( I2CMasterBuffer, 3 );
    }
    

    Then you can send the following command bytes to configure this display for the 96x16 resolution. The SSD1306 controller was developed for a variety of display resolutions and configurations which is why it takes 28 commands to set this up.

    Hope this helps.

    Post pictures once your done!
    SSD1306Reset();    
        SSD1306_Write_Command(0xAE);   //display off
        SSD1306_Write_Command(0x20);    //Set Memory Addressing Mode
        SSD1306_Write_Command(0x10);    //00,Horizontal Addressing Mode;01,Vertical Addressing Mode;10,Page Addressing Mode (RESET);11,Invalid
        SSD1306_Write_Command(0xb0);    //Set Page Start Address for Page Addressing Mode,0-7
        SSD1306_Write_Command(0xc8);    //Set COM Output Scan Direction
        SSD1306_Write_Command(0x00);    //---set low column address
        SSD1306_Write_Command(0x10);    //---set high column address
        SSD1306_Write_Command(0x40);    //--set start line address
        SSD1306_Write_Command(0x81);    //--set contrast control register
        SSD1306_Write_Command(0xaf);    //--contrast value
        SSD1306_Write_Command(0xa1);    //--set segment re-map 0 to 95
        SSD1306_Write_Command(0xa6);    //--set normal display
        SSD1306_Write_Command(0xa8);    //--set multiplex ratio(1 to 16)
        SSD1306_Write_Command(0x0f);    //
        SSD1306_Write_Command(0xa4);    //0xa4,Output follows RAM content;0xa5,Output ignores RAM content
        SSD1306_Write_Command(0xd3);    //-set display offset
        SSD1306_Write_Command(0x00);    //-not offset
        SSD1306_Write_Command(0xd5);    //--set display clock divide ratio/oscillator frequency
        SSD1306_Write_Command(0xf0);    //--set divide ratio
        SSD1306_Write_Command(0xd9);    //--set pre-charge period
        SSD1306_Write_Command(0x22);     //
        SSD1306_Write_Command(0xda);    //--set com pins hardware configuration
        SSD1306_Write_Command(0x02);
        SSD1306_Write_Command(0xdb);    //--set vcomh
        SSD1306_Write_Command(0x49);    //0x20,0.83xVcc
        SSD1306_Write_Command(0x8d);    //--set DC-DC enable
        SSD1306_Write_Command(0x14);    //
        SSD1306_Write_Command(0xaf);    //--turn on oled panel
    
  • MacTuxLinMacTuxLin Posts: 821
    edited 2013-11-30 07:49
    Uploaded my SPIN version that support this OLED driver controller. SSD1306 OLED Driver.
  • xanatosxanatos Posts: 1,120
    edited 2013-12-14 16:34
    Hi MacTuxLin,

    That driver/demo works perfectly - initial hookup is displaying MacTuxLin repeatedly, just like it should. This should give me the base I need to get this project going, thanks very much!

    One question: Did you manually figure out the pixel positions to display MacTuxLin, or did you use any sort of utility? I've created a second DAT block and just loaded it with a binary count to see how that displayed... but I ask because it seems like it would be tedious to create DAT blocks for every message I wished to display on this device. Info appreciated & thanks again,

    Dave
  • CuriousOneCuriousOne Posts: 931
    edited 2013-12-14 22:54
    OLEDs tend to wear out, and provide no outdoor usability at all. The classic 1602 LCD with green backlight still rocks.
  • MacTuxLinMacTuxLin Posts: 821
    edited 2013-12-15 04:06
    xanatos wrote: »
    One question: Did you manually figure out the pixel positions to display MacTuxLin, or did you use any sort of utility? I've created a second DAT block and just loaded it with a binary count to see how that displayed... but I ask because it seems like it would be tedious to create DAT blocks for every message I wished to display on this device.

    :tongue:...know what showing my name was lame but just an example...

    To show this, I use GIMP to create an image space of 96 x 16 pixel. Then, zoom to 400% then place a text "MacTuxLin" & save it as bmp file. Then, I'll use a software, LCD Assistant to convert those bmp to byte array. Copy & format that to your DAT section.

    However, it would be more efficient if you create your own table & display it via function call if you intent to show alphanumerics in real-time,

    As for display, you can also change the intensity with the following setting:
        ackBit := I2C.Write(SCL, controlByte)
        ackBit := I2C.Write(SCL, $81)   ';//--set contrast control register
        ackBit := I2C.Write(SCL, controlByte)
        ackBit := I2C.Write(SCL, Contrast_level)   '<-- Change here for display intensity with range from 1 ~ 254
    

    So if your project has an environment sensor, you can change it according to your program settings.
  • xanatosxanatos Posts: 1,120
    edited 2013-12-15 06:49
    CuriousOne wrote: »
    OLEDs tend to wear out, and provide no outdoor usability at all. The classic 1602 LCD with green backlight still rocks.

    Show me an LCD with the same form factor as this OLED... it needs to fit into an aluminum tube housing with an I.D. of just over 0.6"... the 1602 just wouldn't fit.
    1024 x 576 - 88K
  • xanatosxanatos Posts: 1,120
    edited 2013-12-15 06:52
    Thanks MacTuxLin, sounds pretty straight forward. I'll probably create a callable set of dats for the alphabet & numbers, but my graphics will have to be manually set in that bmp grid method. Thanks for the info on lcd assistant!

    UPDATE: I used the LCD Assistant - it works really well. All I had to do was replace 0x with $ and in it went. There's probably some sort of default setting I can use so it just does the $ automatically, but I haven't really crawled around in it yet. Very happy with that little item.

    Also - brightness range isn't all that spectacular, is it... $00 gives me a dim but visible display, $ff gives me a reasonably visible display, probably not really enough range to justify the HW for ambient light sensing. But thanks for the code anyway... now to go back and look through the datasheets again & see all those available registers. :-)

    Dave
  • xanatosxanatos Posts: 1,120
    edited 2013-12-15 10:46
    I found what says it's a "standard 5x7 font" for this display - it's copied below. I tried using it but I'm not sure exactly how this works. I'm guessing it needs an offset to where a given character begins?

    I just tried loading the whole thing into the OLED and it gives me all sorts of cool little characters - hearts, odd punctuation marks... but I didn't see any letters.

    Any experience with using one of these "preset" font libraries on a Propeller instead of an AVR?

    Thanks.
    #include <avr/io.h>
    #include <avr/pgmspace.h> 
     
    #ifndef FONT5X7_H
    #define FONT5X7_H
    
    // standard ascii 5x7 font
    
    static unsigned char  font[] PROGMEM = {
            
    0x00, 0x00, 0x00, 0x00, 0x00,   
    	0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 	
    	0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 	
    	0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 
    	0x18, 0x3C, 0x7E, 0x3C, 0x18, 
    	0x1C, 0x57, 0x7D, 0x57, 0x1C, 
    	0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 
    0x00, 0x18, 0x3C, 0x18, 0x00, 
    	0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 
    	0x00, 0x18, 0x24, 0x18, 0x00, 
    	0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 
    	0x30, 0x48, 0x3A, 0x06, 0x0E, 
    	0x26, 0x29, 0x79, 0x29, 0x26, 
    	0x40, 0x7F, 0x05, 0x05, 0x07,
    0x40, 0x7F, 0x05, 0x25, 0x3F, 
    	0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 
    	0x7F, 0x3E, 0x1C, 0x1C, 0x08, 
    	0x08, 0x1C, 0x1C, 0x3E, 0x7F, 
    	0x14, 0x22, 0x7F, 0x22, 0x14, 
    	0x5F, 0x5F, 0x00, 0x5F, 0x5F, 
    	0x06, 0x09, 0x7F, 0x01, 0x7F, 
    	0x00, 0x66, 0x89, 0x95, 0x6A, 
    	0x60, 0x60, 0x60, 0x60, 0x60, 
    	0x94, 0xA2, 0xFF, 0xA2, 0x94, 
    	0x08, 0x04, 0x7E, 0x04, 0x08, 
    	0x10, 0x20, 0x7E, 0x20, 0x10, 
    	0x08, 0x08, 0x2A, 0x1C, 0x08, 
    	0x08, 0x1C, 0x2A, 0x08, 0x08, 
    	0x1E, 0x10, 0x10, 0x10, 0x10, 
    	0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 
    	0x30, 0x38, 0x3E, 0x38, 0x30, 
    	0x06, 0x0E, 0x3E, 0x0E, 0x06, 
    	0x00, 0x00, 0x00, 0x00, 0x00, 
    	0x00, 0x00, 0x5F, 0x00, 0x00, 
    	0x00, 0x07, 0x00, 0x07, 0x00, 
    	0x14, 0x7F, 0x14, 0x7F, 0x14, 
    	0x24, 0x2A, 0x7F, 0x2A, 0x12, 
    	0x23, 0x13, 0x08, 0x64, 0x62, 
    	0x36, 0x49, 0x56, 0x20, 0x50, 
    	0x00, 0x08, 0x07, 0x03, 0x00, 
    	0x00, 0x1C, 0x22, 0x41, 0x00, 
    	0x00, 0x41, 0x22, 0x1C, 0x00, 
    	0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 
    	0x08, 0x08, 0x3E, 0x08, 0x08, 
    	0x00, 0x80, 0x70, 0x30, 0x00, 
    	0x08, 0x08, 0x08, 0x08, 0x08, 
    	0x00, 0x00, 0x60, 0x60, 0x00, 
    	0x20, 0x10, 0x08, 0x04, 0x02, 
    	0x3E, 0x51, 0x49, 0x45, 0x3E, 
    	0x00, 0x42, 0x7F, 0x40, 0x00, 
    	0x72, 0x49, 0x49, 0x49, 0x46, 
    	0x21, 0x41, 0x49, 0x4D, 0x33, 
    	0x18, 0x14, 0x12, 0x7F, 0x10, 
    	0x27, 0x45, 0x45, 0x45, 0x39, 
    	0x3C, 0x4A, 0x49, 0x49, 0x31, 
    	0x41, 0x21, 0x11, 0x09, 0x07, 
    	0x36, 0x49, 0x49, 0x49, 0x36, 
    	0x46, 0x49, 0x49, 0x29, 0x1E, 
    	0x00, 0x00, 0x14, 0x00, 0x00, 
    	0x00, 0x40, 0x34, 0x00, 0x00, 
    	0x00, 0x08, 0x14, 0x22, 0x41, 
    	0x14, 0x14, 0x14, 0x14, 0x14, 
    	0x00, 0x41, 0x22, 0x14, 0x08, 
    	0x02, 0x01, 0x59, 0x09, 0x06, 
    	0x3E, 0x41, 0x5D, 0x59, 0x4E, 
    	0x7C, 0x12, 0x11, 0x12, 0x7C, 
    	0x7F, 0x49, 0x49, 0x49, 0x36, 
    	0x3E, 0x41, 0x41, 0x41, 0x22, 
    	0x7F, 0x41, 0x41, 0x41, 0x3E, 
    	0x7F, 0x49, 0x49, 0x49, 0x41, 
    	0x7F, 0x09, 0x09, 0x09, 0x01, 
    	0x3E, 0x41, 0x41, 0x51, 0x73, 
    	0x7F, 0x08, 0x08, 0x08, 0x7F, 
    	0x00, 0x41, 0x7F, 0x41, 0x00, 
    	0x20, 0x40, 0x41, 0x3F, 0x01, 
    	0x7F, 0x08, 0x14, 0x22, 0x41, 
    	0x7F, 0x40, 0x40, 0x40, 0x40, 
    	0x7F, 0x02, 0x1C, 0x02, 0x7F, 
    	0x7F, 0x04, 0x08, 0x10, 0x7F, 
    	0x3E, 0x41, 0x41, 0x41, 0x3E, 
    	0x7F, 0x09, 0x09, 0x09, 0x06, 
    	0x3E, 0x41, 0x51, 0x21, 0x5E, 
    	0x7F, 0x09, 0x19, 0x29, 0x46, 
    	0x26, 0x49, 0x49, 0x49, 0x32, 
    	0x03, 0x01, 0x7F, 0x01, 0x03, 
    	0x3F, 0x40, 0x40, 0x40, 0x3F, 
    	0x1F, 0x20, 0x40, 0x20, 0x1F, 
    	0x3F, 0x40, 0x38, 0x40, 0x3F, 
    	0x63, 0x14, 0x08, 0x14, 0x63, 
    	0x03, 0x04, 0x78, 0x04, 0x03, 
    	0x61, 0x59, 0x49, 0x4D, 0x43, 
    	0x00, 0x7F, 0x41, 0x41, 0x41, 
    	0x02, 0x04, 0x08, 0x10, 0x20, 
    	0x00, 0x41, 0x41, 0x41, 0x7F, 
    	0x04, 0x02, 0x01, 0x02, 0x04, 
    	0x40, 0x40, 0x40, 0x40, 0x40, 
    	0x00, 0x03, 0x07, 0x08, 0x00, 
    	0x20, 0x54, 0x54, 0x78, 0x40, 
    	0x7F, 0x28, 0x44, 0x44, 0x38, 
    	0x38, 0x44, 0x44, 0x44, 0x28, 
    	0x38, 0x44, 0x44, 0x28, 0x7F, 
    	0x38, 0x54, 0x54, 0x54, 0x18, 
    	0x00, 0x08, 0x7E, 0x09, 0x02, 
    	0x18, 0xA4, 0xA4, 0x9C, 0x78, 
    	0x7F, 0x08, 0x04, 0x04, 0x78, 
    	0x00, 0x44, 0x7D, 0x40, 0x00, 
    	0x20, 0x40, 0x40, 0x3D, 0x00, 
    	0x7F, 0x10, 0x28, 0x44, 0x00, 
    	0x00, 0x41, 0x7F, 0x40, 0x00, 
    	0x7C, 0x04, 0x78, 0x04, 0x78, 
    	0x7C, 0x08, 0x04, 0x04, 0x78, 
    	0x38, 0x44, 0x44, 0x44, 0x38, 
    	0xFC, 0x18, 0x24, 0x24, 0x18, 
    	0x18, 0x24, 0x24, 0x18, 0xFC, 
    	0x7C, 0x08, 0x04, 0x04, 0x08, 
    	0x48, 0x54, 0x54, 0x54, 0x24, 
    	0x04, 0x04, 0x3F, 0x44, 0x24, 
    	0x3C, 0x40, 0x40, 0x20, 0x7C, 
    	0x1C, 0x20, 0x40, 0x20, 0x1C, 
    	0x3C, 0x40, 0x30, 0x40, 0x3C, 
    	0x44, 0x28, 0x10, 0x28, 0x44, 
    	0x4C, 0x90, 0x90, 0x90, 0x7C, 
    	0x44, 0x64, 0x54, 0x4C, 0x44, 
    	0x00, 0x08, 0x36, 0x41, 0x00, 
    	0x00, 0x00, 0x77, 0x00, 0x00, 
    	0x00, 0x41, 0x36, 0x08, 0x00, 
    	0x02, 0x01, 0x02, 0x04, 0x02, 
    	0x3C, 0x26, 0x23, 0x26, 0x3C, 
    	0x1E, 0xA1, 0xA1, 0x61, 0x12, 
    	0x3A, 0x40, 0x40, 0x20, 0x7A, 
    	0x38, 0x54, 0x54, 0x55, 0x59, 
    	0x21, 0x55, 0x55, 0x79, 0x41, 
    	0x21, 0x54, 0x54, 0x78, 0x41, 
    	0x21, 0x55, 0x54, 0x78, 0x40, 
    	0x20, 0x54, 0x55, 0x79, 0x40, 
    	0x0C, 0x1E, 0x52, 0x72, 0x12, 
    	0x39, 0x55, 0x55, 0x55, 0x59, 
    	0x39, 0x54, 0x54, 0x54, 0x59, 
    	0x39, 0x55, 0x54, 0x54, 0x58, 
    	0x00, 0x00, 0x45, 0x7C, 0x41, 
    	0x00, 0x02, 0x45, 0x7D, 0x42, 
    	0x00, 0x01, 0x45, 0x7C, 0x40, 
    	0xF0, 0x29, 0x24, 0x29, 0xF0, 
    	0xF0, 0x28, 0x25, 0x28, 0xF0, 
    	0x7C, 0x54, 0x55, 0x45, 0x00, 
    	0x20, 0x54, 0x54, 0x7C, 0x54, 
    	0x7C, 0x0A, 0x09, 0x7F, 0x49, 
    	0x32, 0x49, 0x49, 0x49, 0x32, 
    	0x32, 0x48, 0x48, 0x48, 0x32, 
    	0x32, 0x4A, 0x48, 0x48, 0x30, 
    	0x3A, 0x41, 0x41, 0x21, 0x7A, 
    	0x3A, 0x42, 0x40, 0x20, 0x78, 
    	0x00, 0x9D, 0xA0, 0xA0, 0x7D, 
    	0x39, 0x44, 0x44, 0x44, 0x39, 
    	0x3D, 0x40, 0x40, 0x40, 0x3D, 
    	0x3C, 0x24, 0xFF, 0x24, 0x24, 
    	0x48, 0x7E, 0x49, 0x43, 0x66, 
    	0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 
    	0xFF, 0x09, 0x29, 0xF6, 0x20, 
    	0xC0, 0x88, 0x7E, 0x09, 0x03, 
    	0x20, 0x54, 0x54, 0x79, 0x41, 
    	0x00, 0x00, 0x44, 0x7D, 0x41, 
    	0x30, 0x48, 0x48, 0x4A, 0x32, 
    	0x38, 0x40, 0x40, 0x22, 0x7A, 
    	0x00, 0x7A, 0x0A, 0x0A, 0x72, 
    	0x7D, 0x0D, 0x19, 0x31, 0x7D, 
    	0x26, 0x29, 0x29, 0x2F, 0x28, 
    	0x26, 0x29, 0x29, 0x29, 0x26, 
    	0x30, 0x48, 0x4D, 0x40, 0x20, 
    	0x38, 0x08, 0x08, 0x08, 0x08, 
    	0x08, 0x08, 0x08, 0x08, 0x38, 
    	0x2F, 0x10, 0xC8, 0xAC, 0xBA, 
    	0x2F, 0x10, 0x28, 0x34, 0xFA, 
    	0x00, 0x00, 0x7B, 0x00, 0x00, 
    	0x08, 0x14, 0x2A, 0x14, 0x22, 
    	0x22, 0x14, 0x2A, 0x14, 0x08, 
    	0xAA, 0x00, 0x55, 0x00, 0xAA, 
    	0xAA, 0x55, 0xAA, 0x55, 0xAA, 
    	0x00, 0x00, 0x00, 0xFF, 0x00, 
    	0x10, 0x10, 0x10, 0xFF, 0x00, 
    	0x14, 0x14, 0x14, 0xFF, 0x00, 
    	0x10, 0x10, 0xFF, 0x00, 0xFF, 
    	0x10, 0x10, 0xF0, 0x10, 0xF0, 
    	0x14, 0x14, 0x14, 0xFC, 0x00, 
    	0x14, 0x14, 0xF7, 0x00, 0xFF, 
    	0x00, 0x00, 0xFF, 0x00, 0xFF, 
    	0x14, 0x14, 0xF4, 0x04, 0xFC, 
    	0x14, 0x14, 0x17, 0x10, 0x1F, 
    	0x10, 0x10, 0x1F, 0x10, 0x1F, 
    	0x14, 0x14, 0x14, 0x1F, 0x00, 
    	0x10, 0x10, 0x10, 0xF0, 0x00, 
    	0x00, 0x00, 0x00, 0x1F, 0x10, 
    	0x10, 0x10, 0x10, 0x1F, 0x10, 
    	0x10, 0x10, 0x10, 0xF0, 0x10, 
    	0x00, 0x00, 0x00, 0xFF, 0x10, 
    	0x10, 0x10, 0x10, 0x10, 0x10, 
    	0x10, 0x10, 0x10, 0xFF, 0x10, 
    	0x00, 0x00, 0x00, 0xFF, 0x14, 
    	0x00, 0x00, 0xFF, 0x00, 0xFF, 
    	0x00, 0x00, 0x1F, 0x10, 0x17, 
    	0x00, 0x00, 0xFC, 0x04, 0xF4, 
    	0x14, 0x14, 0x17, 0x10, 0x17, 
    	0x14, 0x14, 0xF4, 0x04, 0xF4, 
    	0x00, 0x00, 0xFF, 0x00, 0xF7, 
    	0x14, 0x14, 0x14, 0x14, 0x14, 
    	0x14, 0x14, 0xF7, 0x00, 0xF7, 
    	0x14, 0x14, 0x14, 0x17, 0x14, 
    	0x10, 0x10, 0x1F, 0x10, 0x1F, 
    	0x14, 0x14, 0x14, 0xF4, 0x14, 
    	0x10, 0x10, 0xF0, 0x10, 0xF0, 
    	0x00, 0x00, 0x1F, 0x10, 0x1F, 
    	0x00, 0x00, 0x00, 0x1F, 0x14, 
    	0x00, 0x00, 0x00, 0xFC, 0x14, 
    	0x00, 0x00, 0xF0, 0x10, 0xF0, 
    	0x10, 0x10, 0xFF, 0x10, 0xFF, 
    	0x14, 0x14, 0x14, 0xFF, 0x14, 
    	0x10, 0x10, 0x10, 0x1F, 0x00, 
    	0x00, 0x00, 0x00, 0xF0, 0x10, 
    	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
    	0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 
    	0xFF, 0xFF, 0xFF, 0x00, 0x00, 
    	0x00, 0x00, 0x00, 0xFF, 0xFF, 
    	0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 
    	0x38, 0x44, 0x44, 0x38, 0x44, 
    	0x7C, 0x2A, 0x2A, 0x3E, 0x14, 
    	0x7E, 0x02, 0x02, 0x06, 0x06, 
    	0x02, 0x7E, 0x02, 0x7E, 0x02, 
    	0x63, 0x55, 0x49, 0x41, 0x63, 
    	0x38, 0x44, 0x44, 0x3C, 0x04, 
    	0x40, 0x7E, 0x20, 0x1E, 0x20, 
    	0x06, 0x02, 0x7E, 0x02, 0x02, 
    	0x99, 0xA5, 0xE7, 0xA5, 0x99, 
    	0x1C, 0x2A, 0x49, 0x2A, 0x1C, 
    	0x4C, 0x72, 0x01, 0x72, 0x4C, 
    	0x30, 0x4A, 0x4D, 0x4D, 0x30, 
    	0x30, 0x48, 0x78, 0x48, 0x30, 
    	0xBC, 0x62, 0x5A, 0x46, 0x3D, 
    	0x3E, 0x49, 0x49, 0x49, 0x00, 
    	0x7E, 0x01, 0x01, 0x01, 0x7E, 
    	0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 
    	0x44, 0x44, 0x5F, 0x44, 0x44, 
    	0x40, 0x51, 0x4A, 0x44, 0x40, 
    	0x40, 0x44, 0x4A, 0x51, 0x40, 
    	0x00, 0x00, 0xFF, 0x01, 0x03, 
    	0xE0, 0x80, 0xFF, 0x00, 0x00, 
    	0x08, 0x08, 0x6B, 0x6B, 0x08,
    	0x36, 0x12, 0x36, 0x24, 0x36, 
    	0x06, 0x0F, 0x09, 0x0F, 0x06, 
    	0x00, 0x00, 0x18, 0x18, 0x00, 
    	0x00, 0x00, 0x10, 0x10, 0x00, 
    	0x30, 0x40, 0xFF, 0x01, 0x01, 
    	0x00, 0x1F, 0x01, 0x01, 0x1E, 
    	0x00, 0x19, 0x1D, 0x17, 0x12, 
    	0x00, 0x3C, 0x3C, 0x3C, 0x3C, 
    	0x00, 0x00, 0x00, 0x00, 0x00, 
    };
    #endif
    
    
  • xanatosxanatos Posts: 1,120
    edited 2013-12-15 13:23
    Just throwing this up here - a visualization aid for byte order and positioning. Top row of two bytes is 00 - 95, bottom row is 96 to 191 (ignore the number on the graphic there :-) ). The letter "P" is shown. Full top row completes first, then wraps to bottom, so the top halves of the characters are built first, then the bottom halves.
    415 x 550 - 65K
  • MacTuxLinMacTuxLin Posts: 821
    edited 2013-12-16 01:24
    Yeah, this display has Page 0 & 1. Looks like you're using the vertical mode. Take a look at the datasheet for SSD1306 on page 25. I did this a few months back on my AVR-powered device & did up my own bitmap table that suits my needs. Those ready picture maps are nice but they don't really suit my needs. So I created my own.
  • rogersydrogersyd Posts: 223
    edited 2014-03-25 06:15
    xanatos wrote: »
    I found what says it's a "standard 5x7 font" for this display - it's copied below. I tried using it but I'm not sure exactly how this works. I'm guessing it needs an offset to where a given character begins?

    [/code]

    Hi Xanatos,

    Any luck incorporating the alphabet character set into your code? I found another driver for this chip on the objex, that includes text capabilities, but it is for the SPI version of the display. I could try to convert it to the I2c code from MacTuxLin if not...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-03-25 08:21
    I have a Propeller (Spin) version of an I2C driver for this display.

    The driver is just a translation I made of some Arduino code.

    The driver doesn't set all the setting it should in the OLED's control chip since I don't know what those setting should be. The small I2C only display I have works some of the time with this code but it's very inconsistent. I haven't spent more time on it since the displays with a SPI interface appear to be less expensive than these I2C only versions.

    It shouldn't be hard to add whatever setting your display requires by using the I2C write methods in the object.

    It also shouldn't be too hard to incorporate the features of SPI driver's code into this I2C version.
  • rogersydrogersyd Posts: 223
    edited 2014-03-25 08:55
    Duane,

    Thanks for the code and the lead on an alternative display. Your code runs on the 128x32 from adafruit, and will require just a bit of tweaking to get it 100%. Im going to pick up the display you mentioned as it appears much more suited to this project. Thanks again for sharing!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-03-25 11:40
    I learned here, you can get the SPI version of the 128x32 display at ITead Studio. It's hard to beat their $5 price.
Sign In or Register to comment.