close-circle
Close
0%
0%

KIM Uno Digital Clock

A program was created to display a digital clock in a KIM Uno. #IStandWithAhmed

Similar projects worth following
close
A KIM Uno was searching for a good project. A student in Texas get arrested for bringing a clock to school. An idea was born. Using the hardware for a KIM Uno, why not write a program to display the time. The 6502 assembly program is relatively short and can be shared over twitter with the hash tag #TweetAClock https://twitter.com/hashtag/TweetAClock?src=hash

A lot of hardware builds have been submitted to the list Clocks for Social Good, this is a little different, this is a software clock that can be shared over twitter, the original tweet can be found here:

https://twitter.com/arduinoenigma/status/647956908272431106

The KIM Uno replica was used as a host for a program to display time. It has a RAM and an EEPROM area. The RAM area was used to store the time variables. The program resides in EEPROM, thus it only has to be entered once. On future power ups, all that needs to be done is to set the time and start the clock.

To set the time, memory location 0x0024 needs to be set with the seconds, 0x0025 with the minutes and 0x0026 with the hours. To keep the program size to a minimum, no validation for a valid time is made, if the values exceed 59 for the minutes and seconds and 23 for the hours, the clock will simply increment them until they rollover back to 0 after reaching 99. Eventually they will rollover to valid values, but it may take a few days for that to happen.

This project made it to the hackaday.com front-page, [Al Wiliams] wrote this great analysis: http://hackaday.com/2015/09/29/kim-1-clock/

  • 1 × KIM Uno Kit
  • 1 × Clock Program

  • New Enigma Z App for the KIM Uno

    Arduino Enigma12/29/2016 at 12:04 0 comments

    In addition to this clock program, now there is a new application you can add to your KIM Uno, an Enigma Z Machine Simulator.

    Follow the link below to learn more:

    https://hackaday.io/project/18644-mystery-6502-program-for-the-kim-uno-1kbchallenge

  • Project submitted to reddit An Unconventional Clock contest

    Arduino Enigma04/06/2016 at 03:13 0 comments

    This project was submitted to a reddit unconventional clock contest. Two entries will win. One will be decided by popular vote, the other one by a panel of judges.

    https://www.reddit.com/r/diyelectronics/comments/4dh0x8/voting_thread_beginner_challenge_an/

  • Adjusting the time delay

    Arduino Enigma09/27/2015 at 21:21 0 comments

    The routine from 424 to 42D delays for a second while keeping the display alive by calling the KIM ROM routine to display the value of cells F9,FA,FB on the display. On my KIM, the value of 45 was found to be the best, 46 is too slow, 44 is too fast.

    If you need to adjust yours, hold the [RS] key down for more than 1 second until the display flashes, this indicates that the write protection to the EEPROM is off. then enter [AD] 425 [DA] and type your new two digit delay value.

    To have a more precise delay, a nested loop containing nops would need to be placed inside the existing loop. This would increase the byte count though.

    The time display routine would look like this. To adjust the time, change the LDA $44 and LDA $90 lines. The first one is a coarse and the second a fine adjustment.

    LDA #$44
    STA *$28
    L1
    
    JSR $1F1F
    
    LDA #$90
    STA *$27
    L2
    NOP
    DEC *$27
    BNE L2
    
    DEC *$28
    BNE L1
    JMP START

  • Program Listing

    Arduino Enigma09/27/2015 at 02:24 0 comments

    * = $0400
    0400 START  
    0400        SED             F8
    0401        CLC             18
    0402        LDX #$00        A2 00
    0404        LDA #$01        A9 01
    0406        STA *$29        85 29
    0408 NEXTD  
    0408        LDY #$00        A0 00
    040A        LDA *$29        A5 29
    040C        ADC *$24,X      75 24
    040E        STA *$24,X      95 24
    0410        CMP CARRYT,X    DD 32 04
    0413        BEQ CONTIN      F0 06
    0415        LDY *$24,X      B4 24
    0417        LDA #$00        A9 00
    0419        STA *$29        85 29
    041B CONTIN 
    041B        STY *$24,X      94 24
    041D        STY *$F9,X      94 F9
    041F        INX             E8
    0420        CPX #$03        E0 03
    0422        BNE NEXTD       D0 E4
    
    0424        LDA #$45        A9 45
    0426        STA *$28        85 28
    0428 L1     
    
    0428        JSR $1F1F       20 1F 1F
    
    042B        DEC *$28        C6 28
    042D        BNE L1          D0 F9
    
    042F        JMP START       4C 00 04
    
    
    0432 CARRYT 
    0432 .BYTE $60              60
    0433 .BYTE $60              60
    0434 .BYTE $24              24

View all 4 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates