5
\$\begingroup\$

I have a 0.96 inch 128x64 Yellow-Blue OLED display module like this: OLED module and I want to use it for a project. The Driver of it is SSD1306. if you see in the datasheet of SSD1306, you will know that it supports 8-bit 68xx/80xx parallel and 3-/4- wire SPI and I2C interfaces. Now, I have several questions:

  1. If you were me, Which one would you choose to connect it to MCU?(8-bit 68xx? 80xx parallel? 3-/4- wire SPI? and or I2C?) and why?
  2. Which one is better for simpler?
  3. I think parallel interfaces are faster(right?) but I can't find anything about 8-bit 68xx and 80xx!(article or web-page or etc. If you have any information about these please let me know). Also, I could find this:What are 6800-series / 8080-series parallel interface? and Is there any 8080 Series Parallel Interface standard? but, these are not enough. What's the diffrence between the 8-bit 68xx and 80xx? Which one is faster? Totally, In your opinion which one is better?

B.T.W: My MCU is STM32F1(it supports all interfaces even 80xx and 68xx parallel) and all AVR series.

\$\endgroup\$
3
\$\begingroup\$

They are all comparable, with the tradeoffs being Pins vs Speed. It really boils down to your preference. How many free pins do you have (Can you spare 8 data + 4/5 control pins for parallel data?), are you already using SPI or I2C? The I2C version will limit you to only 2 lcds without using multiple I2C buses or buffers/switches, but only requires 3 data lines (SDA/SCL/Reset) and simplifies the command/data code by including it into a byte instead of requiring external pin toggling.

If you were me, I'd use i2c, but mostly because I prefer it. If you are already using SPI, that be the way to go.

As for 6800 vs 8080 lcd addressing, they are pretty similar, and have no performance difference. The 6800 interface is a bit easier to implement, and for the most part, is exactly the same as the common HD44780 character lcd interface.

\$\endgroup\$
  • 1
    \$\begingroup\$ Is it common for I2C capable chips like the SSD1306 to have such a limited number of configurable slave addresses? \$\endgroup\$ – RedGrittyBrick Oct 9 '13 at 11:09
  • 1
    \$\begingroup\$ @RedGrittyBrick Sometimes, sometimes not. This specific lcd only uses 1 address pin, and that pin only has two states (High/Low). Some have more address pins, and some have pins which can be High/Low/Floating/Tied to SDA/Tied to SCL or any other combination. Or you can use multiple i2c buses or multiple switch/buffers. It's an addressable protocol, so there are some limits. \$\endgroup\$ – Passerby Oct 9 '13 at 11:17
  • \$\begingroup\$ @roh updated a bit. \$\endgroup\$ – Passerby Oct 9 '13 at 11:24
2
\$\begingroup\$

Be careful here: SPI very often does not allow to read from LCD. And because you have to address 4 or 8 adjacent pixels. So - LCD memory mapping to drop whole picture at once, no pixel manipulation. 8080/6800 good for small microcontrollers. Check state of pixels (read from LCD), change whole group of pixels(to not alternate neighbors) and voila!

\$\endgroup\$
1
\$\begingroup\$

From my experience is best choice SPI with 4 wires, because it is easy to use with HW SPI and in combination with DMA (yes, not all MCU has DMA) it can sent whole frame buffer in the background without touching from main program which can do other things during this time.

Also is possible to use SPI with 3 wires but with DMA it will be more complicated where you need send instead 8 bits also one extra bit command/data as nine bit.

With I2C is also possible to use it in combination with DMA to transfer whole frame buffer at once on background. but some MCUs has more complicated I2C peripheral and need more effort to get it working.

But sometimes there is no other chance because some displays especially 96x16 or 128x32 has only I2C or SPI.

Also is possible to use simple bit-banging, but with lot of disadvantages.

I never try parallel 8080 or 6800 interface with OLED displays, because it need lot of wires but it is generally the simplest interface and is well described in SSD1306 datasheet in 8.1.1 and 8.1.2 sections.

\$\endgroup\$
  • \$\begingroup\$ I wonder why displays use 9-bit SPI rather than having a command that says "treat everything that follows as data as long as CS remains asserted"? And maybe have a mode where two or more consecutive rising edges on the data line while clock is low would be treated as a release and reassertion of CS (reducing the required pin count to two while only requiring eight clock pulses per byte). \$\endgroup\$ – supercat Oct 10 '16 at 22:22
-2
\$\begingroup\$

I would select I2C interface as you are able to use bit bang code from any spare micro IO pins if the UARTS are already in use.

\$\endgroup\$
  • 1
    \$\begingroup\$ You could bit bang SPI just as easily, couldn't you? \$\endgroup\$ – Kortuk Jan 14 '14 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.