Page 1 of 1
Oled (SSD1306) as slave SOLVED!
Posted: Wed Sep 28, 2016 8:27 pm
by tiny
Is it possible the display macro "GLCD (SSD1306)" use as I2C slave (or a modified macro)? When I use the macro function other slaves on this bus is not functioning properly.
thanks
Christina
Re: Oled (SSD1306) as slave
Posted: Thu Sep 29, 2016 10:56 am
by Benj
Hi Christina,
Can you post your program so we can see what your doing and hopefully find the cause of the problems?
Re: Oled (SSD1306) as slave
Posted: Thu Sep 29, 2016 3:53 pm
by tiny
Thanks Benj for the answer!
I do not want to publish this project, I can send the files as PM to you.
My problem: I have an RTC and an I2C LCD display on the bus. Now I want to replace the LCD display by Oled SSD1306. I have the Oled display simply connected to the I2C bus to and thereby destroys the I2C Display. Why I do not know. The RTC works here and there.
The I2C bus I finished with 2k2 to V +.
If I only RTC and Oled on the bus, it also happens that the RTC is not always achievable.
With RTC and LCD display all already a 1/2 year running in field operation.
Tiny
Re: Oled (SSD1306) as slave
Posted: Fri Sep 30, 2016 9:23 pm
by Bachman
Normally, the I2C bus needs 4.7 kOhm pull up. If you use 2.2 kOhm and the SSD1306 has built-in pull up, the result can be lower than 2.2 kOhm. Smaller resistance, harder to pull down by the RTC and/or SSD1306. Or try to monitor the I2C bus by a logic analyser.
Re: Oled (SSD1306) as slave
Posted: Fri Sep 30, 2016 10:21 pm
by tiny
Thanks for the answer!
I dont know if the OLED display has pull ups (no datasheet). The 2k2 resistors may cause problems in this case, of course.
I was thinking more of a macro in which I pretend the slave address and not as in the Oled macro where the I2c pins are specified.
In my I2C LCD I programmed a routine with which I solved with parameters specifying all functions.
When Oled display I do not know how I can create a font and transmitted. I also fear that the routine simply is too big then.
I am using a PIC18F26K22 and am quite at the limit!
Tiny
Re: Oled (SSD1306) as slave
Posted: Mon Oct 03, 2016 1:25 pm
by Benj
Hi Tiny,
The GLCD Font data can be pulled from the GLCD Base component. This contains the GLCD simulation but also the embedded function ReadASCIILUT which will convert a ASCII value into the font pixel data you need.
Each character must be passed - 32 so to print the value 'A' you must pass pos_str as 'A' - 32.
Each character has 5 bytes of font data so for 'A' you would have to call the function 5 times using the count parameter values 0 - 4.
Hope this helps.
Re: Oled (SSD1306) as slave
Posted: Mon Oct 03, 2016 11:11 pm
by tiny
Thanks for the tip Benj!
I'll try it.
Tiny