david0126 / u8glib

Automatically exported from code.google.com/p/u8glib
Other
0 stars 0 forks source link

SSD1351 extremely dim. #195

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. using U8GLIB_SSD1351_128X128_HICOLOR u8g(8, 9, 7)
2. using the PrintTest example
3.

What is the expected output? What do you see instead?
Hello World in white text is expected.
What you get is an EXTREMLY dim hello world.

What version of the product are you using? On what operating system?
arduino, 1.0.5, windows 7 64bit.

Please provide any additional information below.
Looks like brightness/pixel data isnt being sent properly, as the pixels are 
lit up but extremely dim.

Original issue reported on code.google.com by rainw...@gmail.com on 3 Sep 2013 at 5:07

GoogleCodeExporter commented 8 years ago
This is great news. There will probably be one small tweak required before it 
works with the OLED128 module, because on that module we enable/disable the 
higher voltage power for the OLED (a 15V boost converter power supply is 
onboard the OLED128) by toggling GPIO0 on the SSD1351 itself (it has two GPIOs 
built in.)

Original comment by rainw...@gmail.com on 3 Sep 2013 at 9:21

GoogleCodeExporter commented 8 years ago
Just added some text, i am using a freetonics OLED128 module which has a PSU 
added on that requires that GPIO to be enabled. That may be the reason why its 
very dark.

Original comment by rainw...@gmail.com on 3 Sep 2013 at 9:23

GoogleCodeExporter commented 8 years ago
what exactly has to be done to solve your problem?
Is there some additional init sequence needed?
Is there a link to this OLED module available?

Original comment by olikr...@gmail.com on 3 Sep 2013 at 11:23

GoogleCodeExporter commented 8 years ago
I assume this is the oled:
http://www.freetronics.com/products/128x128-pixel-oled-module#.UieSnMWLe1F

Discussion is here:
http://forum.freetronics.com/viewtopic.php?t=5477&p=10695

Still the question is: What are the required controller commands.

Original comment by olikr...@gmail.com on 4 Sep 2013 at 8:07

GoogleCodeExporter commented 8 years ago
The required commands look like simply turning on the first GPIO output.

void OLED::setDisplayOn(bool on)
{
  // GPIO0 drives OLED_VCC, driving it high turns on the boost converter
  // module, driving it low turns it off.

  if(on) {
    setGPIO0(OLED_HIGH);
    delay(100);
  }
  assertCS();
  writeCommand(on ? 0xAF : 0xAE);
  releaseCS();

  if(!on) {
    setGPIO0(OLED_LOW);
    delay(100);
  }
}

and here is the GPIO segment 

void OLED::setGPIO0(OLED_GPIO_Mode gpio0)
{
  assertCS();
  gpio_status = (gpio_status & ~0x03) | (uint8_t)gpio0;
  writeCommand(0xB5, gpio_status);
  releaseCS();
}

Original comment by rainw...@gmail.com on 4 Sep 2013 at 11:41

GoogleCodeExporter commented 8 years ago
thanks

Original comment by olikr...@gmail.com on 5 Sep 2013 at 5:10

GoogleCodeExporter commented 8 years ago
from the datasheet:
A[1:0] 
GPIO0: 00 pin HiZ, Input disabled
01 pin HiZ, Input enabled
10 pin output LOW [reset]
11 pin output HIGH

--> 0xB5 0x03  (GPIO0 output high, GPIO1 input HiZ)

Original comment by olikr...@gmail.com on 5 Sep 2013 at 5:35

GoogleCodeExporter commented 8 years ago
from u8g_dev_ssd1351_128x128.c:

    U8G_ESC_ADR(0),                    /* instruction mode */
    0xb5,
    U8G_ESC_ADR(1),
    0x00,                            /* Set GPIO */ 

This could be changed to:

    U8G_ESC_ADR(0),                    /* instruction mode */
    0xb5,
    U8G_ESC_ADR(1),
    0x03,                            /* Set GPIO */ 

--> wrote e-mail

Option are:
- update the existing device
- create a new u8glib device for the freetronics OLED

Original comment by olikr...@gmail.com on 5 Sep 2013 at 5:45

GoogleCodeExporter commented 8 years ago

Original comment by olikr...@gmail.com on 5 Sep 2013 at 5:46

GoogleCodeExporter commented 8 years ago
maybe also update the sleep mode (--> new u8glib device for freetronics display)

Original comment by olikr...@gmail.com on 5 Sep 2013 at 5:47

GoogleCodeExporter commented 8 years ago
Make it a define perhaps?

You dont want to have to have all those new classes just because of one GPIO

Maybe even just a "FreeTronics_OLED(On)"

Thanks for looking at this

Oleds are pretty crazy. Contrast ratio!!!!!!!

If i can get line drawing down fast they would make an amazing mini CRO.

Original comment by rainw...@gmail.com on 6 Sep 2013 at 10:59

GoogleCodeExporter commented 8 years ago
takeover new devices to u8g.h and U8glib.h

u8g_dev_t u8g_dev_ssd1351_128x128gh_332_sw_spi
u8g_dev_t u8g_dev_ssd1351_128x128gh_332_hw_spi
u8g_dev_t u8g_dev_ssd1351_128x128gh_hicolor_sw_spi
u8g_dev_t u8g_dev_ssd1351_128x128gh_hicolor_hw_spi
u8g_dev_t u8g_dev_ssd1351_128x128gh_4x_332_sw_spi
u8g_dev_t u8g_dev_ssd1351_128x128gh_4x_332_hw_spi
u8g_dev_t u8g_dev_ssd1351_128x128gh_4x_hicolor_sw_spi
u8g_dev_t u8g_dev_ssd1351_128x128gh_4x_hicolor_hw_spi

Original comment by olikr...@gmail.com on 3 Oct 2013 at 3:31

GoogleCodeExporter commented 8 years ago
done, verfied as far as possible

Original comment by olikr...@gmail.com on 3 Oct 2013 at 6:15