coredump wrote:
Which is fine until you run your code on a Commodore 64 in Europe and the interrupts come in at 50Hz. Did the C64 ROM correct for this somehow? I know I had a non-volatile real-time clock add-on for the Atari ST that came with clock software that assumed a 60Hz clock and ran slow on 50Hz mains.
The TOD clock in the 6526 CIA apparently has a setting for 50/60Hz.
Of course doing a clock using the power line freq for interrupts you wouldn't have this luxury. As long as you only want time to the second it's just a matter of counting pulses and incrementing the clock every 50 or 60 counts.
BTW, you can see the schmitt trigger circuit here, it's at the bottom of sheet 2.
http://www.devili.iki.fi/Computers/Commodore/C64/Programmers_Reference/Schematic/