Pocket Watch Page


Home                               Craigs Pages                               Heathers Pages

Mar 2023
I finally got my hands on a round 1.28" LCD which I thought would be fun to play with. This specific display uses a GC9A01 display controller chip so I was forced to development yet another display driver to make this display work. Come to find out, the GC9A01 controller is very similar to the ILI9341 controller which I have worked a lot with. The display is controlled via a 4 wire SPI interface which is driven (in this case) by a ESP32 D1 Mini module. The hardware connections couldn't be much simpler and are shown in the table below.

ESP32 D1 Mini
LCD Signal
3.3V
Vcc
Gnd
Gnd
GPIO 18 (SCK)
SCL
GPIO 23 (MOSI)
SDA
GPIO 33
RES (reset)
GPIO 26
DC
GPIO 5
CS
GPIO 22
BLK

This arrangement uses the VSPI interface of the ESP32 D1 Mini.

As usual, I wanted to program the display using ESP32Forth so I came up with simple prototype code which implements a round, modern looking, watch face. Most of the code for the prototype I had previously written for other projects but the GC9A01 driver was new code. You can see the prototype in operation in the image below where the red circle denotes the hour, the green circle the minute and white circle the second of the current time. In addition the month and day are displayed in the center of the display. This prototype code uses NTP to get the current time since the epoch over the net and my timezone code translates that into current month, day, hour, minute and second times. The code automatically adjust for daylight saving time as well so there is no need for buttons to set the time and date.

I don't know if this prototype will evolve into anything like a real pocket watch but time will tell (no pun intended). In the meantime, I learned some things about how to program for a round display and that was all I was really after.

Picture
Description

Prototype of ESP32Forth running a round LCD display.

This arrangement of hardware may power a stop watch or pocket watch at some point in the future.


Click here to view my ESP32Forth development tree/workspace which contains code for this project along with a bunch of other ESP32Forth projects.

 
Questions and comments to me Craig at: calhjh@gmail.com


Home                               Craigs Pages                               Heathers Pages