How It Works

I previously built the C64 Watch, which is a Commodore 64-themed Lilygo T-Watch 2020 with an onboard BASIC interpreter. But for a smartwatch to be really useful, it needs to be able to sync with a computer. Sure, I could easily sync it with a modern computer, but I thought it would be way more fun to come up with a way to wirelessly sync with an actual Commodore 64 computer.

A common feature of modern smartwatches is their ability to track fitness-related metrics, so I used the C64 Watch's accelerometer as a step counter to demonstrate my wireless syncing method.

The C64 Watch has an onboard infrared transmitter, so it is possible to encode any arbitrary data into a series of IR pulses. I used an IR receiver paired with an Arduino Micro to decode IR signals sent by the watch, then put that data, along with a latch signal, on pins of the C64's user port (sketch here).

On the C64, the assembly program wpal3.prg loads the graphics for the C64 Watch Pal application into the appropriate memory locations, then calls sync.prg to set up the raster interrupts to split the screen between bitmap and text modes. This program also handles checking for new data from the watch, updating the step count data in memory, and displaying it on screen in decimal format.

To Install

Watch

  • Add the official T-Watch Library to Arduino IDE.
  • Copy thisthis, and this in to the src/imgs/ folder within the library.
  • Open c64_watch.ino in Arduino IDE.
  • Plug the T-Watch 2020 in to your computer via USB, and click Sketch->Upload.

Commodore 64

  • Load sync.prg and wpal3.prg onto a disk, SD2IEC drive, etc.
  • Run commands from BASIC prompt:
LOAD"SYNC.PRG",8,1
NEW
LOAD"WPAL3.PRG",8,1
RUN

Media

C64 Watch:

Watch sync tool:

C64 Watch Pal program (for Commodore 64):

Arduino Micro and IR sensor connected to user port breakout board:

The watch runs BASIC, too:

Bill of Materials

  • 1 x Lilygo T-Watch 2020
  • 1 x Commodore 64
  • 1 x Arduino Micro
  • 1 x IR receiver sensor (TSOP38238)

About the Author

Nick A. Bild, MS