Page 1 of 1

gLCD SendCommand() help?

Posted: Mon Dec 31, 2018 1:14 pm
by chad
Hello All.

I just got a new color 128x128 oled display(nice display). It uses the ssd1351 component.

I have been playing with sending commands to it using SendCommand(). For instance SendCommand(174) turns off the display 175 turns it on. Some of the stuff isn't supported in the component so I am trying to do it manually.

There is a command that 'Set Contrast Current for Color A,B,C (C1h)' This is DEC:193. I can send that using the above SendCommand() but it needs a BYTE to follow. I tried using the SendData right after but it doesn't work.

Does anyone know how to send a command 193 and include the BYTE afterword?? There is no ref in any of the help and the wiki has nothing on it..

thanks,

chad

Re: gLCD SendCommand() help?

Posted: Mon Dec 31, 2018 5:55 pm
by LeighM
Have you tried two SendCommand()?

Re: gLCD SendCommand() help?

Posted: Mon Dec 31, 2018 6:19 pm
by chad
Yeah, I tried that too..

Chad

Re: gLCD SendCommand() help?

Posted: Mon Jan 07, 2019 11:32 am
by Benj
Hi Chad,

We do this type of thing in the component and it simply calls the command followed by the data functions.

Code: Select all

    FCD_0ae81_gLCD_SSD1351__SendCommand(0xFD);
    FCD_0ae81_gLCD_SSD1351__SendData(0x12);

    FCD_0ae81_gLCD_SSD1351__SendCommand(0xFD);
    FCD_0ae81_gLCD_SSD1351__SendData(0xB1);
The display datasheets are often far from helpful, maybe try and find some example C code for setting the contrast as you may have to do additional things to get any real variation.

Re: gLCD SendCommand() help?

Posted: Mon Jan 07, 2019 1:03 pm
by chad
HI Ben, Happy new year!

I'll give that a try. Thanks!

EDIT* How do I use that command? I tried it as c and it errors out.
EDIT*2 Ok, that demo was for the non spi version of that component. I found the correct call for the component and it compiles now.
Still doesn't work. This is what I am trying to do:

10.1.20 Set Contrast Current for Color A,B,C (C1h)
This command is used to set Contrast Setting of the display. The chip has 256 contrast steps from 00h to FFh.
The segment output current ISEG increases linearly with the contrast step, which results in brighter display.
I am trying to dim the display.


chad