Done that, this is how far I am now:
list p=16F628A
radix hex
org
;Definitions
STATUS equ 03h ;Set status address
TRISB equ 86h ;Set TRISB address
PORTB equ 06h ;Set PORTB address
;Initialisation
bcf STATUS,0 ;Make sure we are in bank 0
clrf 01h ;Address of the other timer – TMR0
bsf STATUS,0 ;Switch to bank 1
movlw 1<<PSA | b'111' ;Set prescaler
option ;WDT period 2.3s
clrwdt ;Reset the WDT and prescaler
bcf STATUS,0 ;Come back to bank 0
bsf STATUS,5 ;Go to Bank 1
movlw b'00000101' ;Move 00000101 to w
movwf TRISB ;Move 00000101 to TRISB
bcf STATUS,5 ;Go back to Bank 0
;Main Program
while(1){
clrwdt ;Clear WatchdogTimer
delay_s(2)
sleep ;Enters sleep mode
---------- Post added at 22:55 ---------- Previous post was at 22:51 ----------
But my logic say I don't need to use interrupt with RB0 if I am going to wake up with watchdog every 2.3s? Then can just check the IO's every 2.3s?
I do not understand how to count up to 12522 (I need to trigger RB3 every 8hours(28,800s), with wdt of 2.3s I need to count loops till 12522).