udata_acs
pointmsg res 1
-pt_timer13_prescale equ 0
-pt_timer13_inithigh equ 0
-
;======================================================================
code
mov_wf pointmsg ; pointmsg = SS zz zz pp pp pp pp pp
rcall point_set_pin
- set_f TMR3L ; also copies TMR3H into actual timer register
+ clr_f TMR3L ; also copies TMR3H into actual timer register
bs_f T3CON, TMR3ON
panic morse_UP
return
;----------
point_timer_init
- mov_lw (1<<RD16) | (1<<T3ECCP1) | pt_timer13_prescale ; Fcy; !TMR3ON
+ bt_f_if1 idloc1,idloc1_master
+ bra point_timer_init_if_master
+ ; slave:
+ mov_lw (1<<RD16)|(1<<T3ECCP1)| points_slave_t3scale; Fcy;!TMR3ON
+ mov_wf T3CON
+ mov_lw points_slave_t3inith
+ bra point_timer_init_endif_masterslave
+point_timer_init_if_master
+ mov_lw (1<<RD16)|(1<<T3ECCP1)| points_master_t3scale; Fcy;!TMR3ON
mov_wf T3CON
+ mov_lw points_master_t3inith
+point_timer_init_endif_masterslave
+ mov_wf TMR3H ; We just leave this here.
+ ; Since we never read TMR3L, it is never overwritten
+
bc_f PIR2, TMR3IF
bs_f PIE2, TMR3IE
bc_f IPR2, TMR3IP
- mov_lw pt_timer13_inithigh
- mov_wf TMR3H ; we just leave this here, since we never read TMR3L
return
;======================================================================