View Single Post
Old 15th Sep 2019, 8:07 am   #10
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Orton PIC video clock

Forgot to mention: The PIC code is in two parts: the real time part which feeds the serial port, controls the PWM and flaps the SYNC output up and down; and a background process which works out how to display the fingers on completion of each minute. The first is time critical and precisely timed while the second is not time critical and 'goes as fast as it goes'.

The frame blanking periods are used to give time to the background process. At the start of each blank line a timer is armed and control returned to the background process. Just before the next line sync pulse is due, the time generates an interrupt which returns control back to the real time code.

I'm pretty sure this is how the ZX 'slow' mode works. The background process can be written as though nothing else is going on. In truth, its time is heavily diluted by interrupts to service video generation.

I hope this helps.
Karen O is offline