Introduction: Digital Roman Numeral Clock

A Digital Roman Numeral Clock

See it in action in the quicktime movies attached !

There are many ways to display time in both analog and digital, but one never seen by most is a digital Roman numeral clock. I have created one using the following parts:

-PIC18F8F46K20 starter kit
-PICKit2 from Microchip.
-9 V power supply.
-MPLAB IDE 8.40 for writing and compiling the code (free download from Microchip website)
-RTC (real time clock) example program with starter kit modified for this instructable.


Hardware

The starter kit board has a small OLED screen suitable for displaying the time in Arabic digits as ell as roman numerals.
The roman numbering system does not include a '0' so it makes the clock look a bit odd at times as you will see.
The roman numbering system is as follows:

0 no zero in roman numerals so we use spaces
I 1
II 2
III 3
IV 4
V 5
VI 6
VII 7
VIII 8
IX 9
X 10
XI 11
XII 12
XIII 13
XIV 14
XV 15
XVI 16
XVII 17
XVIII 18
XIX 19
XX 20
XXI 21
XXII 22
XXIII 23
XXIV 24
XXV 25
XXVI 26
XXVII 27
XXVIII 28
XXIX 29
XXX 30
XXXI 31
XXXII 32
XXXIII 33
XXXIV 34
XXXV 35
XXXVI 36
XXXVII 37
XXXVIII 38
XXXIX 39
XL 40
XLI 41
XLII 42
XLIII 44
XLIV 44
XLV 45
XLVI 46
XLVII 47
XLVIII 48
XLIX 49
L 50
LI 51
LII 52
LIII 53
LIV 54
LV 55
LVI 56
LVII 57
LVIII 58
LIX 59

An explanation of how each number is formed is found at:

http://en.wikipedia.org/wiki/Roman_numerals



Overview

In the programming examples Microchip supplies is example code for a real-time-clock (RTC). I have adapted this code to create a roman numeral string based on the numbers generated by the RTC code. Since the hours are only 1 to 12 the most spaces the Roman numerals can take up are 4. Minutes and seconds both go from 1 to 59 and 38 has the most Roman numerals characters at seven, so each of those strings must be seven characters long minimum. I have used a colon ':' as a separator between hours, minutes, and seconds in the display the same as the decimal clock. Therefore the total string required is 4(hrs)+1(colon)+7(mins)+1(colon)+7(secs) or 20 characters which will fit into one line across the OLED display.

The OLED display

The OLED display is different from and LCD in that each pixel is an active LED. Unlike and LCD which requires a separate light source to either transmit through or reflect off of the display each OLED pixel emits its own light. If all the pixels are off there is very little power used, and as you turn on more pixels more power is used, but this power is still much less than the typical backlight LCD.

Clock Operation :

There are four buttons associated with the clock The upper left button increments hours, the upper right button increments minutes. The lower left button synchronizes the clock on the zero second by holding it until the time reference displays 00 for seconds and then immediately releasing it. While this button is held down the screen colors is reversed and the clock does not update.
The lower left button allows selecting the display format as seen below: either just normal decimal digital clock, Roman number digital clock, or both at the same time. It you hold this button down the display formats will cycle through all three changing once each second.


The firmware:

The firmware is almost identical to the original firmware supplied by Microchip except I added the tables to fonts. C to create myfonts.c (formerly fonts.c) adding the Roman numerals and main.c became rtcmain.c where I changed the code to add what was needed to display the Roman numerals as well as switch between the display formats. I also modified OLED.C to create double height characters from the original fonts supplied to make them more visible.

If you do not want to make any changes then all you need is to program the RTC.hex file into the starter kit board and you will have a Roman Numeral Clock.


Future Explorations

Given the small size and relatively low power of the OLED display it should be possible to make this into a novel wristwatch. Other, larger fonts could be created to make it more readable with hours, minutes, and seconds each on their own line. Source code is sipped below.



Clocks Challenge

Participated in the
Clocks Challenge