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.
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
An explanation of how each number is formed is found at:
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 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.
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.