ABSTRACT

Timers can be used in a wide range of applications where a time delay function is required based on an input signal. The definition of 8-bit variables to be used for the timer macros, and their allocation in BANK 0 of SRAM data memory. Therefore, all variables of timer macros are initialized within the macro initialize. The off-delay timer can be used to delay setting an output false (OFF—0) for a fixed period of time after an input signal goes false (OFF—0); i. e., the output is held ON for a given period longer than the input. The on-delay timer can be used to delay setting an output true (ON—1) for a fixed period of time after an input signal becomes true (ON—1). The oscillator timer can be used to generate pulse trains with given durations for true (ON) and false (OFF) times. Therefore, the oscillator timer can be used in pulse width modulation (PWM) applications.