BASIC TIMER and TIMER 0 S3F80P5_UM_ REV1.00
PROGRAMMING TIP — Configuring the Basic Timer
This example shows how to configure the basic timer to sample specifications:
ORG 0100H
RESET DI ; Disable all interrupts
LD BTCON,#0AAH ; Disable the watchdog timer
LD CLKCON,#18H ; Non-divided clock
CLR SYM ; Disable global and fast interrupts
CLR SPL ; Stack pointer low byte "0"
; Stack area starts at 0FFH
SRP #0C0H ; Set register pointer 0C0H
EI ; Enable interrupts
MAIN LD BTCON,#52H ; Enable the watchdog timer
; Basic timer clock: fOSC/4096
; Clear basic timer counter
NOP
NOP
JP T,MAIN
10-10