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
Oled (SSD1306) as slave SOLVED!
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Oled (SSD1306) as slave
Hi Christina,
Can you post your program so we can see what your doing and hopefully find the cause of the problems?
Can you post your program so we can see what your doing and hopefully find the cause of the problems?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- tiny
- Posts: 200
- Joined: Wed Jul 08, 2009 8:29 am
- Has thanked: 51 times
- Been thanked: 93 times
- Contact:
Re: Oled (SSD1306) as slave
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
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
- Bachman
- Posts: 116
- Joined: Sun Sep 07, 2014 11:37 am
- Location: Hungary
- Has thanked: 9 times
- Been thanked: 53 times
- Contact:
Re: Oled (SSD1306) as slave
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.
- tiny
- Posts: 200
- Joined: Wed Jul 08, 2009 8:29 am
- Has thanked: 51 times
- Been thanked: 93 times
- Contact:
Re: Oled (SSD1306) as slave
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Oled (SSD1306) as slave
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel