Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

SSD1306 quircks

2 posters

Go down  Message [Page 1 of 1]

1SSD1306 quircks Empty SSD1306 quircks Sat Jan 23, 2021 5:40 pm

mvandorp



I am not sure this is a bug or something I do wrong. I added an SSD1306 to my circuit, but I am unable to output anything on it.

I am using simulide 0.5.15RC4, compiled from source on a Debian Linux workstation. This has support for SSD1306, and comes with an example.

The example is an Arduino Uno, the SSD1306 and 2 pullup resistors, quite straightforward. There is also an Oscope in the circuit to look at the signals.

I load the demo code (I recognized it as the original example from Adafruit), and I can compile it, transfer to the Arduino Uno and run it.

This works as expected.

I am using an Arduino Mega, so I remove the Uno, and replaces it with a Mega. I connect SDA and SCK of the SSD1306 to the Mega, pins 20 (SDA) and 21(SCL). In the code I right-click, change the board to Mega, and recompile and upload.
This also gives me NO errors, but when I start the sim, I see both SDA and SCL go high (red wires, but also on the oScope), and that is it.

Is this a bug, or am I doing something wrong?

Second issue: Can I add 2 SSD1306 displays to my circuit? It seems I cannot assign a different I2C address to the second display...


2SSD1306 quircks Empty Re: SSD1306 quircks Sat Jan 23, 2021 6:32 pm

arcachofo

arcachofo

Is this a bug, or am I doing something wrong?
Probably a bug and probably solved in some of the last commits.

Second issue: Can I add 2 SSD1306 displays to my circuit? It seems I cannot assign a different I2C address to the second display...
These devices have hardcoded address.
There is a pin that can be used to change the lower address bit, but it is not currently implemented, i will add it.
This pin can be used as a chip select, so it would be posible to add as many displays as you want.

Another option would be multiplexing the i2c line...

3SSD1306 quircks Empty Re: SSD1306 quircks Sat Jan 23, 2021 7:31 pm

mvandorp



UPDATE: When I do exactly the same within SimulIDE 0.4.14SR4, everything works as expected!

When I upload the hex file compiled with 0.4.14 and load it in the circuit opened in 0.5.15, it also works!

Final test: When compiling using VSCode and uploading to 0.5.15, it als oruns as expected.

4SSD1306 quircks Empty Re: SSD1306 quircks Sun Jan 24, 2021 3:28 am

arcachofo

arcachofo

It is working for me.

But there is still a problem:
The first time you start the simulation sometimes it doesn't work, if you stop and start again, it works all the times.
I'm tryimg to find the problem.

5SSD1306 quircks Empty Re: SSD1306 quircks Sun Jan 24, 2021 6:32 am

arcachofo

arcachofo

Solved random initialization problem in rev 79.
Added I2C Address property to SSD1306 in rev 80.

It should work now...

6SSD1306 quircks Empty Re: SSD1306 quircks Tue Feb 09, 2021 7:50 pm

mvandorp



I just added a second SSD1306 to my circuit, and I am able to control it independently of each other by configuring different addresses. It works great!

A small request (trivial, I know, but still): My SSD1306 modules are dual-colored: The top 16 lines are yellow, the rest is blue.

Is there any chance this will/can be implemented?

I chose this type, because I use the yellow line as a caption (for setup menus) and as a status line (in normal mode).

For the simulation this is not important, but it would be a nice cherry on the cake

Marcel

7SSD1306 quircks Empty Re: SSD1306 quircks Tue Feb 09, 2021 8:35 pm

arcachofo

arcachofo

I just added a second SSD1306 to my circuit, and I am able to control it independently of each other by configuring different addresses. It works great!
Nice to know. And thanks for testing.

A small request (trivial, I know, but still): My SSD1306 modules are dual-colored: The top 16 lines are yellow, the rest is blue.

Is there any chance this will/can be implemented?
Yes, it is planned.
Not sure when, but eventually..

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum