4/17/2023 0 Comments Roman numeral clock![]() It is very easy to write a number as a Roman numeral. The same is done for 9 - it is not written as VIIII, but instead as IX, because IX is X (10) minus I (1). For example, 4 is not written as IIII, but instead as IV, because IV is V (5) minus I (1). When a lower number (such as I) appears before a higher one (such as V), the lower number is subtracted from the higher one. The letter is written once, then the next largest Roman numeral is written. Instead of writing the same letter four times, a rule for subtraction is used. On many clocks that use Roman numerals, however, 4 is written as IIII. The IV and IX can be read as "one less than 5" (4) and "one less than 10" (9). I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII For example, on the clock of Big Ben, the hours from 1 to 12 are written as: One place in which they are sometimes seen is on clock faces (the front of a clock). However, people still use Roman numerals to this day. From the 14th century, the Europeans replaced Roman numerals with Arabic numerals. The Europeans still used Roman numerals even after the fall of the Roman Empire. Numbers in this system use letters from the Latin alphabet. Source code is sipped below.Roman numerals are a numeral system that was used by ancient Rome. Other, larger fonts could be created to make it more readable with hours, minutes, and seconds each on their own line. Given the small size and relatively low power of the OLED display it should be possible to make this into a novel wristwatch. 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. I also modified OLED.C to create double height characters from the original fonts supplied to make them more visible. 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. The firmware is almost identical to the original firmware supplied by Microchip except I added the tables to fonts. It you hold this button down the display formats will cycle through all three changing once each second. 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. While this button is held down the screen colors is reversed and the clock does not update. 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. There are four buttons associated with the clock The upper left button increments hours, the upper right button increments minutes. 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. 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. The OLED display is different from and LCD in that each pixel is an active LED. 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. I have used a colon ':' as a separator between hours, minutes, and seconds in the display the same as the decimal clock. 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. Since the hours are only 1 to 12 the most spaces the Roman numerals can take up are 4. I have adapted this code to create a roman numeral string based on the numbers generated by the RTC code. ![]() In the programming examples Microchip supplies is example code for a real-time-clock (RTC). The roman numbering system is as follows:Ġ no zero in roman numerals so we use spacesĪn explanation of how each number is formed is found at: Overview 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 starter kit board has a small OLED screen suitable for displaying the time in Arabic digits as ell as roman numerals. RTC (real time clock) example program with starter kit modified for this instructable. MPLAB IDE 8.40 for writing and compiling the code (free download from Microchip website) I have created one using the following parts: There are many ways to display time in both analog and digital, but one never seen by most is a digital Roman numeral clock. See it in action in the quicktime movies attached ! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |