X

Code Questions: CFAL4864A-071BW

Our customer support team is here to help! We have recently received some questions about our small 0.71″ OLED display. These questions and answers are also relevant to our 0.66″ OLED display, which shares the same pinout and controller (the SSD1306).

To send 8 bytes of data using SPI, each byte requires 8 data clocks – does there have to be some delay between each byte?

Kelsey: No you don’t need to put delays in

Brent: Generally. Some devices specifically need a chip select to cycle between bytes, some don’t

I’m using SPI, it seems the display is using an offset on what part of the chip memory is being used. Will I2C use the same offset?

Trevin: yes, memory mapping doesn’t change with the interface

How can I display text?

Kelsey:

A good pre-existing library for putting text on displays is U8g2 which is open source and available here: https://github.com/olikraus/u8g2

An example project where we have created and used a font is available here: https://github.com/crystalfontz/DualVoltmeter/tree/main/CFAG12864T3U3

The bitmaps for the individual characters are in this file: https://github.com/crystalfontz/DualVoltmeter/blob/main/CFAG12864T3U3/fnt_08x08_h.c

Individual characters can be generated using image2code which is available for download here: https://www.crystalfontz.com/product/image2code

to generate the bitmap for the character, load the image (in the size you need the character to be) into the program and it will return hexcode for the image. Be sure to use a monochrome image (1 bit per pixel) so the output is both small and what you expect.

This is another tool we have recommended to people for font generation though I have not personally used it: https://www.ramtex.dk/iconedit/iconedit.htm

Is there any specific command  that can be used to check the state of particular pixel(set or cleared)?

To turn all the pixels on you can send command A5h, to turn them off, command A4h. This is detailed in the Fundamental Command Table on page 28 of the OLED controller datasheet. 

The controller datasheet is available here: https://www.crystalfontz.com/controllers/Solomon%20Systech/SSD1306/339

Contact Us

If you have any questions, we can be reached at support@crystalfontz.com, we also provide chat and telephone support Monday through Friday during our open hours.

We love to hear about your projects! Find us around the web (YouTubeFacebookInstagramLinkedIn,  Twitter, Forum) and let us know what you’re working on.

Related Post