digital clock with a 65C22 (VIACLOCK)

4 posts / 0 new
Last post
Offline
Last seen: 3 weeks 6 days ago
Joined: Dec 10 2021 - 12:26
Posts: 31
digital clock with a 65C22 (VIACLOCK)

The SD card interface uses a 65C22 chip ("VIA") for the I/O between the computer and the SD card, but that chip is also available to the programmer for other purposes. For example keeping track of passing time, something that's not possible on the naked Apple-1. So I wrote a  demo ("VIACLOCK") where a timer is set to generate an interrupt at the rate of one second (corresponding to 15996 CPU clock cycles). The routine that responds to the interrupt keeps account of passing seconds and draws a digital clock in BIG fonts on the screen.

See the video: https://www.youtube.com/watch?v=yWrxlwocEXs

The demo is written in C and its source code is available here: https://github.com/.../blob/main/demos/viatimer/viaclock.c

Curiosity: it can recognize the Replica-1, in which case it takes into account the missing RAM refresh cycles.

Note: if you try it on your SD card interface, don't forget to short the "interrupt" jumper on the interface, that's how the INT signal is delivered to the 6502 CPU.

SD card info: https://p-l4b.github.io/sdcard/

Online
Last seen: 8 min 15 sec ago
Joined: Jun 29 2018 - 16:55
Posts: 215
Awesome stuff! Keep it coming

Awesome stuff! Keep it coming ;)

 

Cheers

Alex

Offline
Last seen: 5 hours 53 min ago
Joined: May 4 2021 - 06:35
Posts: 99
Replica-1 VIACLOCK is available

Hi Alex,

you can download the final version of VIACLOCK suitable for your Replica-1 (along with other interesting new programs that will be introduced soon...) from the main site above.

The section is the "SD CARD FILES ARCHIVE"...

 

If you notice big divergences between VIACLOCK and actual time let us know, some fine-tuning may be needed... ;-)

 

Thank you,

cheers,

Claudio - P-LAB

 

Online
Last seen: 8 min 15 sec ago
Joined: Jun 29 2018 - 16:55
Posts: 215
p-lab wrote:Hi Alex,you can
p-lab wrote:

Hi Alex,

you can download the final version of VIACLOCK suitable for your Replica-1 (along with other interesting new programs that will be introduced soon...) from the main site above.

The section is the "SD CARD FILES ARCHIVE"...

 

If you notice big divergences between VIACLOCK and actual time let us know, some fine-tuning may be needed... ;-)

 

T

 

I have added the VIACLOCK from the archive to my SD card. This version appears to be running accurately now for a while this afternoon, and of course on start it recognized it was on a Replica 1 ;)

 

Cheers,

Alex

Log in or register to post comments