Bitmaps (SPI Mode)

There is a built in microSD card slot into the breakout, and we can use that to load bitmap images! You will need a microSD card formatted FAT16 or FAT32 (they almost always are by default).

Its really easy to draw bitmaps. However, this is only supported when talking to the display in SPI mode, not 8-bit mode!

Find the jumpers.bmp file in the downloaded Arduino library

Copy jumpers.bmp into the base directory of a microSD card and insert it into the microSD socket in the breakout.

You'll need to connect up the CCS pin to Digital 4 on your Arduino as well. See the image below

You may want to try the SD library examples before continuing, especially one that lists all the files on the SD card

Now upload the file->examples->Adafruit_HX8357->spitftbitmap example to your Arduino + breakout. You will see the jumper wires appear!

To make new bitmaps, make sure they are less than 320 by 480 pixels and save them in 24-bit BMP format! They must be in 24-bit format, even if they are not 24-bit color as that is the easiest format for the Arduino. You can rotate images using the setRotation() procedure

You can draw as many images as you want - dont forget the names must be less than 8 characters long. Just copy the BMP drawing routines below loop() and call

bmpDraw(bmpfilename, x, y);

For each bitmap. They can be smaller than 320x480 and placed in any location on the screen.

This guide was first published on Aug 19, 2014. It was last updated on Aug 19, 2014. This page (Bitmaps (SPI Mode)) was last updated on Jul 16, 2019.