Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SSD1306-OLED 128x64 I2C
08-01-2016, 02:50 PM,
#1
SSD1306-OLED 128x64 I2C
I try to test the HelloWord.PDE with en OLED 128x64 I2C and 26J50 (8bits). The program is running, the UserLED toggle every sec. but nothing is display on Oled. I mesured with the scope SDA and SCL and both seems to be active. I modifiy the code for the I2C :
Code:
/**
       Author:     Régis Blanchot (Mar. 2014)
       Tested on:    Pinguino 47J53A & Pinguino 32MX250
       Output:    Oled 0.96" with SSD1306 Controller

       2 size available : SSD1306_128X64 or SSD1306_128X32
       
       Wiring :
       
       if SSD1306_6800
           if SSD1306_PMP
               OLED CS#     connected to GND
               OLED RES#   connected to any GPIO
               OLED D/C#   connected to Pinguino PMA[0:15]
               OLED W/R#  connected to Pinguino PMRD/PMWR
               OLED E/RD# connected to GND
               OLED D[7:0]  connected to Pinguino PMD[7:0]
           else
               OLED CS#     connected to GND
               OLED RES#   connected to any GPIO
               OLED D/C#   connected to any GPIO
               OLED W/R#  connected to any GPIO
               OLED E/RD# connected to GND
               OLED D[7:0]  connected to any GPIO
       if SSD1306_8080
           if SSD1306_PMP
               OLED CS#     connected to GND
               OLED RES#   connected to any GPIO (D3)
               OLED D/C#   connected to Pinguino PMA1 (D4)
               OLED W/R#  connected to Pinguino PMWR (D14)
               OLED E/RD# connected to GND
               OLED D[7:0]  connected to Pinguino PMD[7:0]
           else
               OLED CS#     connected to GND
               OLED RES#   connected to any GPIO (D0)
               OLED D/C#   connected to any GPIO (D1)
               OLED W/R#  connected to any GPIO (D2)
               OLED E/RD# connected to GND
               OLED D[7:0]  connected to Pinguino D[31:24]
       if SSD1306_I2C
       if SSD1306_SPI3
       if SSD1306_SPI4
**/

//#define DISPLAY (SSD1306_PMP | SSD1306_6800 | SSD1306_128X64)
//#define DISPLAY (SSD1306_6800 | SSD1306_128X64)
//#define DISPLAY (SSD1306_8080 | SSD1306_128X64)
#define DISPLAY (SSD1306_I2C  | SSD1306_128X64)
//#define DISPLAY (SSD1306_SPI3 | SSD1306_128X64)
//#define DISPLAY (SSD1306_SPI4 | SSD1306_128X64)

/**
   Load one or more fonts and active them with SSD1306.setFont()
**/

#include <fonts/font6x8.h>
//#include <fonts/font8x8.h>          // wrong direction
//#include <fonts/font10x14.h>        // ???
//#include <fonts/font12x8.h>         // wrong direction
//#include <fonts/font16x8.h>         // wrong direction
//#include <fonts/font16x16.h>        // ???

void setup()
{
   //NB : On Pingino 32MX250 USERLED is on pin 13 which is also used by the PMP Data bus
   // so comment the next line if you use 32MX250 and PMP mode
   pinMode(USERLED, OUTPUT);
   
   // if 6800- or 8080-interface and PMP is used
   //SSD1306.init(1, PMA3); // RST on D1, DC on PMA3 (D2 on a 47J53A)
   
   // if i2c interface is used
   SSD1306.init(0x3C); // i2c address of the display
   
   // if 6800- or 8080-interface (but not PMP) is used
   //void SSD1306.init(u8 rst, u16 dc, u8 d0, u8 d1, u8 d2, u8 d3, u8 d4, u8 d5, u8 d6, u8 d7)
   //SSD1306.init(8, 9, 0, 1, 2, 3, 4, 5, 6, 7);
   
   SSD1306.clearScreen();
   SSD1306.setFont(font6x8);
}  

void loop()
{
   SSD1306.println("Hello World!");
   SSD1306.refresh();
   toggle(USERLED);
   delay(1000);
}

Thanks for your help.

Darby
Reply
14-01-2016, 03:36 PM,
#2
RE: SSD1306-OLED 128x64 I2C
(08-01-2016, 02:50 PM)darby59 Wrote: I try to test the HelloWord.PDE with en OLED 128x64 I2C and 26J50 (8bits). The program is running, the UserLED toggle every sec. but nothing is display on Oled. I mesured with the scope SDA and SCL and both seems to be active. I modifiy the code for the I2C :


Code:
/**
       Author:     Régis Blanchot (Mar. 2014)
       Tested on:    Pinguino 47J53A & Pinguino 32MX250
       Output:    Oled 0.96" with SSD1306 Controller

       2 size available : SSD1306_128X64 or SSD1306_128X32
       
       Wiring :
       
       if SSD1306_6800
           if SSD1306_PMP
               OLED CS#     connected to GND
               OLED RES#   connected to any GPIO
               OLED D/C#   connected to Pinguino PMA[0:15]
               OLED W/R#  connected to Pinguino PMRD/PMWR
               OLED E/RD# connected to GND
               OLED D[7:0]  connected to Pinguino PMD[7:0]
           else
               OLED CS#     connected to GND
               OLED RES#   connected to any GPIO
               OLED D/C#   connected to any GPIO
               OLED W/R#  connected to any GPIO
               OLED E/RD# connected to GND
               OLED D[7:0]  connected to any GPIO
       if SSD1306_8080
           if SSD1306_PMP
               OLED CS#     connected to GND
               OLED RES#   connected to any GPIO (D3)
               OLED D/C#   connected to Pinguino PMA1 (D4)
               OLED W/R#  connected to Pinguino PMWR (D14)
               OLED E/RD# connected to GND
               OLED D[7:0]  connected to Pinguino PMD[7:0]
           else
               OLED CS#     connected to GND
               OLED RES#   connected to any GPIO (D0)
               OLED D/C#   connected to any GPIO (D1)
               OLED W/R#  connected to any GPIO (D2)
               OLED E/RD# connected to GND
               OLED D[7:0]  connected to Pinguino D[31:24]
       if SSD1306_I2C
       if SSD1306_SPI3
       if SSD1306_SPI4
**/

//#define DISPLAY (SSD1306_PMP | SSD1306_6800 | SSD1306_128X64)
//#define DISPLAY (SSD1306_6800 | SSD1306_128X64)
//#define DISPLAY (SSD1306_8080 | SSD1306_128X64)
#define DISPLAY (SSD1306_I2C  | SSD1306_128X64)
//#define DISPLAY (SSD1306_SPI3 | SSD1306_128X64)
//#define DISPLAY (SSD1306_SPI4 | SSD1306_128X64)

/**
   Load one or more fonts and active them with SSD1306.setFont()
**/

#include <fonts/font6x8.h>
//#include <fonts/font8x8.h>          // wrong direction
//#include <fonts/font10x14.h>        // ???
//#include <fonts/font12x8.h>         // wrong direction
//#include <fonts/font16x8.h>         // wrong direction
//#include <fonts/font16x16.h>        // ???

void setup()
{
   //NB : On Pingino 32MX250 USERLED is on pin 13 which is also used by the PMP Data bus
   // so comment the next line if you use 32MX250 and PMP mode
   pinMode(USERLED, OUTPUT);
   
   // if 6800- or 8080-interface and PMP is used
   //SSD1306.init(1, PMA3); // RST on D1, DC on PMA3 (D2 on a 47J53A)
   
   // if i2c interface is used
   SSD1306.init(0x3C); // i2c address of the display
   
   // if 6800- or 8080-interface (but not PMP) is used
   //void SSD1306.init(u8 rst, u16 dc, u8 d0, u8 d1, u8 d2, u8 d3, u8 d4, u8 d5, u8 d6, u8 d7)
   //SSD1306.init(8, 9, 0, 1, 2, 3, 4, 5, 6, 7);
   
   SSD1306.clearScreen();
   SSD1306.setFont(font6x8);
}  

void loop()
{
   SSD1306.println("Hello World!");
   SSD1306.refresh();
   toggle(USERLED);
   delay(1000);
}

Thanks for your help.

Darby

I test the Oled Display with Arduino and it work corrcetly.
Reply
04-02-2017, 12:33 PM,
#3
RE: SSD1306-OLED 128x64 I2C
I have tried the code shown (using Win 10, IDE v12 and PIC32MX440) and it does not compile. When entering the OLED display adress (0x3C) as argument after the SSD1306....... commands it compiles and the program runs (USERLED in operation) but nothing more. The OLED (Adafruit) has been tested with Arduino and works. The SSD1306 commands are not covered in the Wiki.

Testing with an LCD display together with PCF8574 gives a lighting display but no text when testing the PCF8574-example. Have been fiddling with the arguments but no result. Also this has been tested with Arduino and works OK !

It seems that Pinguino does not like I2C.

Yes I have tried IDE v11 but it only works once. It then has to be reinstalled to get it going again only one time!

Any ideas out there or have all given up ?
Reply
05-02-2017, 05:59 PM,
#4
RE: SSD1306-OLED 128x64 I2C
(04-02-2017, 12:33 PM)Newcomer Wrote: I have tried the code shown (using Win 10, IDE v12 and PIC32MX440) and it does not compile. When entering the OLED display adress (0x3C) as argument after the SSD1306....... commands it compiles and the program runs (USERLED in operation) but nothing more. The OLED (Adafruit) has been tested with Arduino and works. The SSD1306 commands are not covered in the Wiki.

Testing with an LCD display together with PCF8574 gives a lighting display but no text when testing the PCF8574-example. Have been fiddling with the arguments but no result. Also this has been tested with Arduino and works OK !

It seems that Pinguino does not like I2C.

Yes I have tried IDE v11 but it only works once. It then has to be reinstalled to get it going again only one time!

Any ideas out there or have all given up ?

go to member list at the top of the forum ad email regis he is the master

fred
Reply
13-02-2017, 08:02 PM,
#5
RE: SSD1306-OLED 128x64 I2C
Thanks for the advice. I have followed it but no response !

We who are 70+ need working examples to experiment with. I have found that a number of examples are not working or are not even possible to compile.

/ Urban
Reply
13-02-2017, 09:17 PM,
#6
RE: SSD1306-OLED 128x64 I2C
(13-02-2017, 08:02 PM)Newcomer Wrote: Thanks for the advice. I have followed it but no response !

We who are 70+ need working examples to experiment with. I have found that a number of examples are not working or are not even possible to compile.

/ Urban

What other examples are you having issues with?
fred
Reply
17-02-2017, 06:07 PM,
#7
RE: SSD1306-OLED 128x64 I2C
We solved a lot of issues in the latest Pinguino v12 (15-02-2017).
Please update your copy.
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
17-02-2017, 08:37 PM,
#8
RE: SSD1306-OLED 128x64 I2C
(17-02-2017, 06:07 PM)regis Wrote: We solved a lot of issues in the latest Pinguino v12 (15-02-2017).
Please update your copy.

Regis,
 thank you for the updates and your time.much appreciated.
fred
Reply
20-02-2017, 11:00 AM,
#9
RE: SSD1306-OLED 128x64 I2C
Regis,
Thanks for the information and updates. Looking forward to coming experiments !
Urban
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)