Source: https://mokxi.com/learn/arduino-gc9a01
Updated: 2026-10-26

Learn

# A GC9A01 round display on an Arduino: a watch face

Intermediate

Written by the Mokxi team, updated October 26, 2026

Start building free Open the editor

Or see every lesson.

- 455 parts on the bench
- 43 boards running now
- 1.00x real time, on every board

Click to open it in the editor

A round 240x240 GC9A01 on SPI and a DS3231 on I2C, drawing an analog clock on a simulated ATmega328P.

The GC9A01 is the controller behind the 1.28 inch round color displays used in homemade watches, gauges and robot eyes. The glass is a circle 240 pixels across, it talks SPI, and the drawing calls are the same Adafruit GFX ones you may know from other color screens.

The circuit above is an Uno drawing an analog clock on a GC9A01, with the time from a DS3231 clock module. It draws the dial once, then moves the hands each second. Press Run: the dial takes a few seconds to appear, because an Uno has a lot of pixels to send, and then the second hand starts to move.

## What you need

- An Arduino Uno
- A 1.28 inch GC9A01 round display module
- A DS3231 clock module
- A breadboard and jumper wires

## Wiring

Part and pin | Goes to | Note

GC9A01 VCC | 5 V | The module has its own regulator

GC9A01 GND | GND |

GC9A01 SCL | Pin 13 | SPI clock, even though it says SCL

GC9A01 SDA | Pin 11 | SPI data (MOSI), even though it says SDA

GC9A01 CS | Pin 10 | Chip select

GC9A01 DC | Pin 9 | Command or data

GC9A01 RES | Nothing | Left free; the library resets it with a command

DS3231 SDA, SCL | A4, A5 | The clock, on I2C

## SCL and SDA, but not I2C

The labels on most GC9A01 modules say SCL and SDA, which makes everybody think of I2C. They are SPI. SCL is the SPI clock and goes to pin 13 on an Uno, and SDA is the data in and goes to pin 11. CS picks the display and DC tells it whether a byte is a command or a pixel.

That leaves A4 and A5, the Uno’s real I2C pins, free for the DS3231. The two buses do not get in each other’s way.

## The Adafruit GC9A01A library

Install "Adafruit GC9A01A" from the Library Manager, and it brings Adafruit GFX with it. In Mokxi both are built in. The constructor takes CS and DC, here Adafruit_GC9A01A tft(10, 9), and an optional reset pin third. begin() sends the long start-up table, wakes the panel and turns it on.

After that you draw with GFX: fillScreen(), drawLine(), drawCircle(), fillCircle(), setCursor() and print(). Colors are 16-bit numbers, with names such as GC9A01A_BLACK, GC9A01A_WHITE and GC9A01A_RED.

The memory is a 240 by 240 square, and the round glass sits on it. The center is (120, 120) and the radius is 120, so anything you draw in the corners is stored but nobody sees it.

From the round watch face sketch

## Draw what moves, not the whole screen

A full screen is 240 times 240 pixels at two bytes each: 115,200 bytes. That is more than fifty times the Uno’s memory, so the Uno cannot keep a copy of the screen. It sends pixels straight to the display as it draws them. In the circuit here, filling the screen black and drawing the dial takes about three seconds, and that is why the face appears a little after you press Run.

So the sketch never redraws the face. Each second it draws the old hands again in black, which rubs them out, and then draws the new ones. Three thin lines take a moment, where a full redraw would take seconds and flicker.

The hands come from a small table of sines in steps of 6 degrees, one minute of the dial. The DS3231 starts at 10:08:30, so the minute hand points at the 8 minute mark and the hour hand at dial position 50, which is (10 x 5) plus 8 / 12 rounded down.

## The time from the DS3231

The sketch does not use an RTC library. It reads the DS3231’s first three registers with Wire: seconds, minutes and hours, starting at register 0. The chip stores each as two decimal digits packed into one byte, called BCD, so fromBcd() turns 0x38 into 38 before the sketch uses it.

loop() reads the clock every 20 milliseconds and only redraws when the seconds have changed. So the hands move once a second, and the display spends the rest of the time idle. If the clock does not answer, readClock() returns false and the sketch tries again 20 milliseconds later.

## Colors, rotation and text

The GC9A01’s glass is IPS, and it shows colors inverted until the driver tells it not to. The library does that in begin(), so you only see it if you write your own driver: black comes out white. Colors are 16 bits, five for red, six for green and five for blue, which is why pure red is 0xF800.

setRotation() turns the picture in steps of 90 degrees, handy when the module is mounted upside down. Text works with setCursor(), setTextColor() and print(), the same GFX calls as on other color screens; in Mokxi the text is a 5x8 font.

With a reset pin wired, give it as the third argument: Adafruit_GC9A01A tft(10, 9, 8). There is also a five-pin form that takes the data and clock pins too, for software SPI on any pins, at the cost of speed.

## Common mistakes

Wiring SCL and SDA to A5 and A4 because the labels look like I2C. On an Uno they go to pins 13 and 11.

Redrawing the whole screen in loop(). It works, but slowly, and it flickers. Erase and redraw only the parts that change.

Drawing in the corners of the square memory, outside the round glass.

Leaving the clock module unwired and expecting a time. Pull the DS3231’s SDA wire here and the dial still draws, but no hands ever appear, because the sketch waits for a time it never gets.

## Questions

Which library do I use for a GC9A01 on Arduino?

Adafruit GC9A01A (Adafruit_GC9A01A.h) with Adafruit GFX. TFT_eSPI also supports the GC9A01, mostly on ESP32 boards.

Is the GC9A01 SPI or I2C?

SPI. The pins labeled SCL and SDA are the SPI clock and data, so they go to pins 13 and 11 on an Uno.

What resolution is the GC9A01 round display?

240 by 240 pixels, with the round glass centered at (120, 120) and a radius of 120.

Why is my GC9A01 slow on an Arduino Uno?

A full screen is 115,200 bytes, and an Uno sends them one by one over SPI. Draw only what changes, as the watch face does with its hands.

Related

## Keep going

Arduino ST7735: 1.8 Inch Color TFT Wiring and Code Arduino OLED Display (SSD1306) Tutorial Arduino ILI9341 TFT Display: Wiring and Code Arduino DS3231 Clock With a TM1637 Display SPI Explained: Clock, Data and Chip Select How the GC9A01 is modeled The Arduino Uno simulator The project page, with the full sketch Intermediate

Sources

## Where the facts on this page come from

- Arduino: Adafruit GC9A01A library reference (checked 2026-10-26)

## Build this for real

Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.

Start building free Open the editor
