Reply to topic  [ 37 posts ]  Go to page 1, 2, 3, 4  Next
1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU0059) 
Author Message
Site Admin

Joined: Sun Aug 05, 2012 4:02 pm
Posts: 632
Post 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU0059)
Image



Image

A larger 1.3" version of our ultra low power tiny uOLED display module. This display has the same 128 x 64 pixel resolution of the smaller 0.96" module but has a significantly larger screen. The module also uses the SH1106 driver which provides a configurable serial interface. By default the display uses a standard SPI interface but it can be reconfigured to use I2C (soldering required). To get you up and running quickly we have also written an extensive Arduino library which will not only work with both sizes of display but will also allow you to drive multiple displays from one Arduino board. The display requires 5 digital pins with only 3 extra pins per additional display (two if individual resetting of the modules isn't required).

Available in white pixel: HCMODU0058 or blue pixel: HCMODU0059


Shop links:

1.3" White: http://hobbycomponents.com/displays/621-3-sh1106-uoled-display-module-white
1.3" Blue: http://hobbycomponents.com/displays/622-3-sh1106-uoled-display-module-white



Image

Module size: 35.5x33.3mm
High pixel density
Resolution: 128X64
Super wide viewing angle: more than 160°
Ultra-low power consumption: normal display 0.06W (far below the TFT display)
Wide supply range: DC 3V-5V (without any changes, directly compatible with common 3.3V and 5V power supply system)
Industrial grade: Operating temperature range -30 C ~ 70 C
Ultra-small size
Chip select CS signal allows for multiple SPI or IIC devices on the same bus.
Compatible tolerant interface.
OLED screen, internal driver chip: SH1106
Pixel Colour: White (HCMODU0058), Blue (HCMODU0059)



Image

Please note that some version shipped have different screen print labeling for the two data pins (D0 = SCK & D1 = SDA). See pin out below for more information.

1....GND............(Power ground)
2....VCC.............(3.3V or 5V power supply)
3....D0 / SCK......(CLK Clock)
4....D1 / SDA......(MOSI data)
5....RST.............(Reset)
6....DC..............(Data / command)
7....CS..............(Chip select signal)



Image

Image


Connecting multiple displays:

Image

Note that when using the HCuOLED library, if you don't require the option of resetting multiple displays individually you can connect the reset pins on each module together and drive them from one digital pin on your Arduino. Therefore you will only require an additional 2 digital pins per display.



Image

Code:
/* /* FILE:    HCuOLED_Things_Example
   DATE:    16/04/15
   VERSION: 0.1
   AUTHOR: Andrew Davies
   
REVISIONS:

12/03/15 Created version 0.1


This example uses the line, rectangle and bitmap graphic functions together with
the INVERT DrawMode to create a simple animation.

To use this example connect your uOLED display to the following pins of your
Arduino:


MODULE..........ARDUINO
GND.............GND
VCC.............3.3V
D0 (CLK)........D13
D1 (DATA).......D11
RST (RESET).....D8
DC..............D9
CS (SS).........D10


You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.
This software may not be used directly for the purpose of promoting products that
directly compete with Hobby Components Ltd's own range of products.

THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES,
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR
LACK OF NEGLIGENCE. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE
FOR ANY DAMAGES INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER. */

#include "HCuOLED.h"
#include "SPI.h"

/* Example bitmap */
const PROGMEM byte Tiny_Logo_Resistor[] =
{
  0xC0, 0xE0, 0x30, 0x30, 0xF0, 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x38, 0x0E, 0x07, 0x1E, 0x78, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x70, 0x1C, 0x07, 0x0F, 0x3C, 0xF0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0x3C, 0x0F, 0x07, 0x1C, 0x70, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x78, 0x1E, 0x07, 0x0E, 0x38, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, 0xF0, 0x30, 0x30, 0xE0, 0xC0,
  0x00, 0x01, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x3C, 0x38, 0x0E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1E, 0x38, 0x1C, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x38, 0x38, 0x0E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1C, 0x38, 0x1E, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x38, 0x3C, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x01, 0x00,
};


/* Digital pin number for the displays chip select pin */
#define CS_DI 10
/* Digital pin number for the displays data/command pin */
#define DC_DI 9
/* Digital pin number for the displays reset pin */
#define RST_DI 8

/* Array indexes for the X and Y coordinates */
#define X1 0
#define Y1 1
#define X2 2
#define Y2 3

/* Arrays to store coordinates and direction for the line, rectangle and bitmap */
byte Box[4] = {1,1,20,20};
byte BoxDir[4] = {1,1,1,1};
byte Line[4] = {100,25,120,55};
byte LineDir[4] = {-1,-1,-1,-1};
byte Bitmap[2] = {40,40};
byte BitmapDir[2] = {-1,-1};



/* Create an instance of the library (uncomment one of the lines below) */
//HCuOLED HCuOLED(SSD1307, SS_DI, DC_DI, RST_DI); // For SSD1307 displays (HCMODU0050 & HCMODU0052)
HCuOLED HCuOLED(SH1106, CS_DI, DC_DI, RST_DI); // For SH1106 displays (HCMODU0058 & HCMODU0059)


void setup()
{

  /* Reset the display */
  HCuOLED.Reset();
}

void loop()
{
  /* Display some text using a small 8x8 fixed width font */
  HCuOLED.SetFont(Terminal_8pt);
  HCuOLED.Cursor(44,0);
  HCuOLED.Print("HOBBY");
  HCuOLED.Cursor(20,10);
  HCuOLED.Print("COMPONENTS");

  /* Display a number using a large 4 line LCD style font */
  HCuOLED.Cursor(20,24);
  HCuOLED.SetFont(LCDLarge_24pt);
  HCuOLED.Print("HCuOLED");
 
  /* Change the draw mode from NORMAL to INVERT */
  HCuOLED.DrawMode(INVERT);
  while(1)
  {
    /* Move the positions of the 3 objects */
    MoveRect();
    MoveLine();
    MoveBitmap();
   
    /* Draw the objects to the display buffer */
    HCuOLED.Rect(Box[X1],Box[Y1],Box[X2],Box[Y2], SOLID);
    HCuOLED.Line(Line[X1],Line[Y1],Line[X2],Line[Y2]);
   
    HCuOLED.Cursor(Bitmap[X1],Bitmap[Y1]);
    HCuOLED.Bitmap(84, 2, Tiny_Logo_Resistor);
   
    /* Write the display buffer to the screen */
    HCuOLED.Refresh();
   
    /* Draw the objects again. As we are in INVERT mode this will remove them */
    HCuOLED.Rect(Box[X1],Box[Y1],Box[X2],Box[Y2], SOLID);
    HCuOLED.Line(Line[X1],Line[Y1],Line[X2],Line[Y2]);
   
    HCuOLED.Cursor(Bitmap[X1],Bitmap[Y1]);
    HCuOLED.Bitmap(84, 2, Tiny_Logo_Resistor);
  }
}


/* Update the X and Y coordinates for the box */
void MoveRect(void)
{
  if(Box[X1] == 0 || Box[X1] == 127)
    BoxDir[X1] *= -1;
  Box[X1] += BoxDir[X1];
 
  if(Box[Y1] == 0 || Box[Y1] == 63)
    BoxDir[Y1] *= -1;
  Box[Y1] += BoxDir[Y1];
 
  if(Box[X2] == 0 || Box[X2] == 127)
    BoxDir[X2] *= -1;
  Box[X2] += BoxDir[X2];
 
  if(Box[Y2] == 0 || Box[Y2] == 63)
    BoxDir[Y2] *= -1;
  Box[Y2] += BoxDir[Y2];   
}

/* Update the X and Y coordinates for the Line */
void MoveLine(void)
{
  if(Line[X1] == 0 || Line[X1] == 127)
    LineDir[X1] *= -1;
  Line[X1] += LineDir[X1];
 
  if(Line[Y1] == 0 || Line[Y1] == 63)
    LineDir[Y1] *= -1;
  Line[Y1] += LineDir[Y1];
 
  if(Line[X2] == 0 || Line[X2] == 127)
    LineDir[X2] *= -1;
  Line[X2] += LineDir[X2];
 
  if(Line[Y2] == 0 || Line[Y2] == 63)
    LineDir[Y2] *= -1;
  Line[Y2] += LineDir[Y2];   
}

/* Update the X and Y coordinates for the bitmap */
void MoveBitmap(void)
{
  if(Bitmap[X1] == 0 || Bitmap[X1] == 43)
    BitmapDir[X1] *= -1;
  Bitmap[X1] += BitmapDir[X1];
 
  if(Bitmap[Y1] == 0 || Bitmap[Y1] == 47)
    BitmapDir[Y1] *= -1;
  Bitmap[Y1] += BitmapDir[Y1];
}





Image

HCuOLED Arduino library for above sketch is available for download from the software section of our support forum here:

http://forum.hobbycomponents.com/viewtopic.php?f=58&t=1817

Or from github here:
https://github.com/HobbyComponents/HCuOLED


SH1106 Datasheet:
Attachment:
SH1106.pdf


SH1106 command table showing the command number, the hex commands and the POR values. Thanks to nigelmercier for creating this.

Attachment:
SH1106 Command Table.pdf



1.3" OLED display datasheet:

Attachment:
GMO13002-4PIN(1_3) SERIES Spec.pdf



Schematics:

Attachment:
1.3-4-SPI.pdf


You do not have the required permissions to view the files attached to this post.


Fri Apr 17, 2015 4:25 pm
Profile

Joined: Thu Aug 20, 2015 5:00 pm
Posts: 2
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
I've got one of these working with an Espruino Pico, which is itself a very nice piece of kit. I'm about to write some documentation, and then try to send everything to the Espruino Github repository. I'll post again when I succeed...


Sun Aug 30, 2015 11:37 am
Profile

Joined: Thu Aug 20, 2015 5:00 pm
Posts: 2
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
There is now an Espruino module for this display here:
http://www.espruino.com/SH1106
For more details also look here:
http://www.espruino.com/SSD1306


Thu Sep 10, 2015 8:37 pm
Profile

Joined: Sun Jan 05, 2014 12:40 pm
Posts: 14
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
I've got an existing library that I wrote for a Nokia 5110 LCD. Is it feasible to convert it for use with this device?


Wed Jan 06, 2016 11:34 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 622
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
It would probably need a lot of modification. The 5110 uses a different driver and interface to the SH1106. It may be possible to write a wrapper or modify the low level functions that write to the display but because the screens are also different resolutions you would probably have to modify other functions in the library too. Depending on how the library is written it will probably be less work to modify your program to work with an existing library. I.e. our HCuOLED library.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Thu Jan 07, 2016 12:48 pm
Profile

Joined: Sun Jan 05, 2014 12:40 pm
Posts: 14
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
Thanks for your reply. The only problem is that I'm using a PIC, so have a lot of code to convert if I use your library. My only output requirements are text with a 5x8 font, and text with a font that spans 5 rows; the latter is done by sending each row as a partial glyph of the large character. I don't have any need for drawing or scrolling etc.

The main functions I need to "borrow" are the initialisation sequence, and the code that does the actual SDI output. At present I do this with bit-banging, although I could use the SDI port in a later revision of my PCB.

Also, is there a more current datasheet for this?
[EDIT] Found this:[LINK REMOVED BY ADMIN]


Thu Jan 07, 2016 1:39 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 622
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
I've updated the datasheet in the first post.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Thu Jan 07, 2016 4:43 pm
Profile

Joined: Sun Jan 05, 2014 12:40 pm
Posts: 14
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
Also found this [LINK REMOVED BY ADMIN - See section 5.2 of forum terms and conditions]


Thu Jan 07, 2016 10:21 pm
Profile

Joined: Sun Jan 05, 2014 12:40 pm
Posts: 14
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
Sorry, just trying to be helpful!

Do you have an ETA for these to be in stock?


Sat Jan 09, 2016 8:59 am
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 622
Post Re: 1.3" SH1106 uOLED Display Module (HCMODU0058 & HCMODU005
Quote:
Do you have an ETA for these to be in stock?


Not at the moment I'm afraid. I'm told that some robotic toy manufacturer bought out most of the market in the second half of last year and the shortage has caused the price of them to shoot up. We're waiting for the price to fall again before buying new stock. The price of the 0.96" displays has now fallen so hopefully the price of the 1.3" ones will drop soon too.

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Sat Jan 09, 2016 9:50 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 37 posts ]  Go to page 1, 2, 3, 4  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD