[SOLVED] Interfacing a 0.96" OLED I2C with a Bare Atmega328P-PU

Hello all!

Just got a new shipment today which included a 0.96" Blue and Yellow OLED Screen that is interfaced over I2C. Amazingly, for $10, the manufacturer had enough sense to pretty much backpack the outputs to just VCC (3-5VDC), GND (ground), SCL (clock) and SDA (digital, I think?). I am in the final stages of a Arduino based project and so I also received a replica of the chip on the Uno, pre-programmed with Arduino bootloader/OS/whatever you'd like to call it and a blink sketch. It also came with a convenient Addicore pinout sticker for the actual microprocessor which I applied.

I haven't ever used IIC/I2C or interfaced any screen besides a 4 digit clock. I hooked up the GND and VCC accordingly but I can't help but to notice that the SCL and SDA pinouts are non-existent on the standalone Atmega that I have. After further reading, I found that they were added pins available on the Uno not normally present on the standalone 328P-PU. I read a little more and found a possibly outdated 2010 blog that said you should use Analog 4 for SDA and 5 for SCL, but I need this confirmed. Is there anything else I need to do? Just wire it directly? I don't need any resistors or to change any of the packages/code in Adafruit's SSD1306 Library?

Basically my question is: How do I interface an IC2 OLED Screen from my bare Atmega328P-PU since there are not SDA or SCL pinouts?

Thanks and regards,
Chris Kuhn

Screen (datasheets in desc.): http://www.amazon.com/gp/product/B00O2LLT30

It's been about 12 hours so... bump!

Keep in mind that I don't want to have to use any additional hardware besides caps and resistors.

Thanks!

Chris

I suggest to read the official documentation.
Your questions are confirmed here: https://www.arduino.cc/en/Main/arduinoBoardUno

For the plain atmega328 i found this picture:

(picture is from instructables.com, AndyTallack, CC BY-NC-SA)

You see the SDA and SCL pins there?

Another question from you is related to the resistors. Yes, you need resistors for the I2C bus to pull the levels hight, however, these resistors are sometimes on the OLED itself. I personally would add 2x 10K to be safe.

Oliver

Thanks for the link and image! @olikraus

That's just what I needed. I checked the datasheets on the screen I have and it does appear to have a 10k resistor built in but I'll use 2 10k like you said just to be safe.

Thanks again and regards,

Chris

This thread is officially solved and thus far closed.