It works great with my Raspbery Pi via python script.
I would like to use this small device with LCD proc daemon.
Is there a driver I can use with SSD131x OLED controller ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As the controller supports the HD44780 command set, it makes sense to create just a connection type for the hd44780 driver.
Although this will result in some code duplication, I suggest to start with a copy of the hd44780-i2c.c file and hack in the protocol to senddata() and initialization code to init().
It seems the controller also supports sending consecutive data bytes. In that case you may opt for some optimization cache. Hd44780-lcd2usb uses this for example.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the tip.
I removed HD44780's specific code from hd44780-i2c.c file. Sending a ascii stream to i2c bus almost did the trick. Display shows some readable messages mixed with a garbage.
It seems to be problem with the controller command set.
I can start to capture incoming codes and translate from hd44780 command set to SSD131x command set. But I think there must be smarter way.
Where can I find information how LCDd "talks" to the displays ? What control codes it uses (home, cls, gotoXY, etc...)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When working in hd44780-i2c you will see hd44780 control codes. There should not really be a need to translate those, as the SSD131x command set is compatible. The only thing you need to ensure is that RE and IS modes are not accidentally switched on (Function Set Command).
At first you may try to:
- Turn off the heartbeat in LCDd.conf. This also makes debugging a lot easier.
- Do no call common_init, but initialize the display properly on your own.
The only control codes used other than during initialization are 'Set DDRAM Address' and 'Set CGRAM Address'.
Last edit: Markus Dolze 2013-10-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Finally got it working.
My own init code works, SetDDRAM address and other commands seems to works too.
Even a big clock screen looks ok - I think characters ROM is similar to HD44780.
I didn't implement back-light functions as there is no back-light. I think it should be mapped to brightness command (this OLED display has 256 brightness level).
I didn't check writing to CGRAM functions (for custom fonts).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just received a similar display, but in the size 20x4. With the driver from Piotr it works half... Online the top 2 lines show tekst, the bottom 2 stay blank.
Since I have 0 experience with programming, some help is very, very welcome...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Recently I bought nice small OLED display from www.wide.hk site: http://www.wide.hk/products.php?product=-IIC-%7B47%7D-I2C-1602-OLED-Module-Display-%252d-For-Arduino-%7B47%7D-PIC-%7B47%7D-AVR-%7B47%7D-ARM
It works great with my Raspbery Pi via python script.
I would like to use this small device with LCD proc daemon.
Is there a driver I can use with SSD131x OLED controller ?
is it shipped with some more detailed datasheet? From their web page it seems that you do not have to deal with the details of the OLED controller.
But even if you do not need to take care of the OLED controller, there is currently no driver that just writes text to I2C like their example does.
Hello, We also buy some here, and would use it with LCDProc
We would use it in a commercial project.
Is there someone that could make a driver for this screen ?
Technical infos here :
http://www.wide.hk/download/I2C1602OLED.rar
Thanks !
OLED controller need a specific initialization code.
After initialization we just need to write text to i2c.
Here, my small example in Python: https://github.com/0xFACE/RPi-OLED-Display-SSD1311
Which one of existing drivers will be the best start point for hacking new driver?
Best regards.
As the controller supports the HD44780 command set, it makes sense to create just a connection type for the hd44780 driver.
Although this will result in some code duplication, I suggest to start with a copy of the hd44780-i2c.c file and hack in the protocol to senddata() and initialization code to init().
It seems the controller also supports sending consecutive data bytes. In that case you may opt for some optimization cache. Hd44780-lcd2usb uses this for example.
Thanks for the tip.
I removed HD44780's specific code from hd44780-i2c.c file. Sending a ascii stream to i2c bus almost did the trick. Display shows some readable messages mixed with a garbage.
It seems to be problem with the controller command set.
I can start to capture incoming codes and translate from hd44780 command set to SSD131x command set. But I think there must be smarter way.
Where can I find information how LCDd "talks" to the displays ? What control codes it uses (home, cls, gotoXY, etc...)?
When working in hd44780-i2c you will see hd44780 control codes. There should not really be a need to translate those, as the SSD131x command set is compatible. The only thing you need to ensure is that RE and IS modes are not accidentally switched on (Function Set Command).
At first you may try to:
- Turn off the heartbeat in LCDd.conf. This also makes debugging a lot easier.
- Do no call common_init, but initialize the display properly on your own.
The only control codes used other than during initialization are 'Set DDRAM Address' and 'Set CGRAM Address'.
Last edit: Markus Dolze 2013-10-15
Finally got it working.
My own init code works, SetDDRAM address and other commands seems to works too.
Even a big clock screen looks ok - I think characters ROM is similar to HD44780.
I didn't implement back-light functions as there is no back-light. I think it should be mapped to brightness command (this OLED display has 256 brightness level).
I didn't check writing to CGRAM functions (for custom fonts).
@Piotr
I am also interested in using this OLED display, is your code already in the LCDproc GIT merged or could you please share it.
Many Thanks.
No, is not included in the LCDproc.
I wrote "working hack" for hd44780-i2c driver.
Here is my code:
https://github.com/0xFACE/RPi-OLED-Display-SSD1311
Perfect timing. I'm looking at using the same display for my pfSense firewall.
The only thing I'm not quite sure about is what I would need to hook it up. Would a straight USB to I2C adapter work (is there even such a thing)?
I've just received a similar display, but in the size 20x4. With the driver from Piotr it works half... Online the top 2 lines show tekst, the bottom 2 stay blank.
Since I have 0 experience with programming, some help is very, very welcome...