Saturday, February 23, 2008

EVK1100: OLED display refresh rate over SPI

A nice 128x128 OLED display have been collecting dust in my drawer - but not anymore! Since the sparkling fun site has collected all documentations including driver datasheet and sample code, it was easy. To make it even easier I opted for serial connection, shorting BS1 and BS2 on the carrier board to ground and connecting to port SPI1 as follows:
* D0 - SCK .
* D1 - MOSI.
* D/C# - LED2 (silkscreen says LED3) on EVK1100.
* CS - CS[3] aka PA20.
* RESET# - LED3 (silkscreen says LED4) on EVK1100.

OLED display running a demo drawing random circles:


The carrier board - it helped a lot on prototyping by including a boost converter required for OLED display and providing coarse enough connector area.


Demos are all good and nice, but the real question is what is the refresh rate of this beauty?

Theoretical maximum framerate while writing directly to display RAM is calculated as follows:
* frame size in pixels = 132*132 = 17424 pixels.
* frame size in bits = (3*8)*(size in pixels) = 418 176 bits.
* SPI speed = 15 Mbps.
* framerate = 15 000 000 (bits per second) / 418 176 (bits per frame) = 35.9 frames per second.

A very simple test was made which gradually increased background intensity in 64 steps - from white to black and the time to display 640 frames was measured to be 20.8 seconds. This corresponds to 30.7 frames per second, which is only slightly below theoretical maximum. Considering it was achieved with simple polling SPI it is not bad at all.

Combined with second framebuffer (using 51 kilobytes SDRAM out of 32 768 available) this OLED makes a beautiful display unit.

No comments: