User Tools

Site Tools


base:tod_calibration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

base:tod_calibration [2019-05-19 07:49]
soci created
base:tod_calibration [2019-05-19 08:04]
soci
Line 1: Line 1:
-The code below sets the TOD 50/60 Hz pre-scaler of CIA. It needs to correspond to the power line frequency ​which might or might not relate to the video standard.+The code below initializes ​the TOD 50/60 Hz pre-scaler of CIA based on the detected AC line frequency.
  
 The idea is to use the horizontal retrace frequency (15.6-16 KHz) as base to measure the TOD tick interval. If it takes longer then a threshold the 50 Hz pre-scaler is used otherwise the 60 Hz one. The idea is to use the horizontal retrace frequency (15.6-16 KHz) as base to measure the TOD tick interval. If it takes longer then a threshold the 50 Hz pre-scaler is used otherwise the 60 Hz one.
Line 10: Line 10:
   * Does not mess with timers or anything else   * Does not mess with timers or anything else
  
-Of course timer NMIs should be avoided during ​the measurement. If interrupts are already disabled it can be shortened by 3 bytes.+Of course timer NMIs should be avoided during ​calibration. If interrupts are already disabled it can be shortened by 3 bytes.
  
 <​code>​ <​code>​
base/tod_calibration.txt ยท Last modified: 2019-05-19 08:04 by soci