Skip to content

Latest commit

 

History

History
16 lines (14 loc) · 422 Bytes

timer.md

File metadata and controls

16 lines (14 loc) · 422 Bytes

The timer

16 bit timer

  • Default base address is 0420h
  • Can launch two interrupts:
    • Timer tick (at Ftick = Fclk / prescaler [Hz])
    • Timer counter compare (at Fcmp = Ftick / compare [Hz])

Registers

  • Counter (at 0420h)
    • incremented at Ftick [Hz]
  • Prescaler (at 0421h)
  • Enable register (at 0422h)
    • bit 1: Timer enable
  • Counter compare (at 0423h)
    • if 0, counter compare is disabled