You are here

Running an I2C OLED lCD on PSOC5 | Cypress Semiconductor

Running an I2C OLED lCD on PSOC5

Summary: 23 Replies, Latest post by tonyL on 12 Jun 2017 07:58 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
Andres Pineda's picture
User
20 posts

Thank you very much for the port! that works great on the PSoC4 boards. I tried using the code on a 5LP and am not having much luck. The screen just displays random bits. It seems that the I2C  component that is compatible with the 5LP behaves differently than the one on the PSoC4. Anyway, I submitted my experience to the forum and hope someone can shed light on wat is different between the I2C UDB in 5LP. In theory, they should work the same as the I2C protocol is the same.

Anyway, just wanted to say thanks for publishing your work.

akatenev's picture
User
1 post

Where is a little difference between I2C Component API on PSoC4  and same on PSoC 5. PSoC 5 can send only 256 bytes in one transaction, if you use MasterWriteBuf function. Then use this code instead:

    I2COLED_MasterSendStart(_i2caddr,I2COLED_WRITE_XFER_MODE);
    
    for (i = 0; i < size; i++)
    {
        status = I2COLED_MasterWriteByte(buf[i]);
    }
    
    I2COLED_MasterSendStop();

It will work.

user_192504620's picture
User
8 posts

Hi Crusty,

Could you share with me your oled code?

hufe01's picture
User
3 posts

Success! Thank you! How is it possible to send the same generic output data to the android or iphone. and output to the display via bluetooth app.
 

Bibith Paul's picture
User
2 posts

Hi Derk,

Do you have a different font library. Text in this library is either too big (2) or too small (1).

user_14586677's picture
User
7645 posts

There are projects here that may be of use -

 

https://secure.cypress.com/?rID=107402 BLE 100 projects in 100 days

 

Regards, Dana.

jasonkahana_1482786's picture
User
26 posts

This version works on the PSoC5 CY8CKIT-059

cqrp_2240891's picture
User
3 posts

Hi

I have been successful in getting to work an OLED display (SSD1306, I2C, bought from ebay) with the CY8CKIT-059 kit. The code that I used is exactly the same as in the post above.  The display works fine except for a flaw:

Nothing is displayed on the display once the -059 kit is power cycled (unplugged and plugged back into the USB port of the PC). In order to get the display back again, the code needs to be reprogrammed / downloaded again into the kit.

I also added the LED flashing sample code / design  into the OLED schematic to check if it too stops working once the kit is power cycled. However the LED continues to flash fine, just that the display does not work after the power cycle. I need to download the code again to get it to work until the next power cycle.

I am using PSoC Creator 4.0 with Update 1 to build and program the -059 kit..

Any help will be appreciated in order to get the display to work with a fresh boot of the -059 kit.

 

TIA.

 

cqrp_2240891's picture
User
3 posts

Anybody??

Or could somebody share a working project using the SSD1306 I2C OLED display with the CY8CKIT-059 kit?

Regards,

 

user_1377889's picture
User
10572 posts

Is the OLED powered by the PSoC board or powered separately? I would assume that there is a slave hanging problem.

Because there is no bus reset defined for I2C a slave may "hang" the bus. I have seen hints to try the following:

Before starting the I2C component force 9 clock cycles by changing the drive mode to strong and toggling the pin by the program.

Then re-configure the pin and start the I2C component.

 

Bob

Log in to post new comments.