From dda5124e9ccecb36d9bd7a95fbd8dee6f7a21922 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 25 Dec 2005 23:30:32 +0000 Subject: [PATCH] add tick.asm and compile it (but still does not link) --- detpic/Makefile | 2 +- detpic/points.fin | 3 ++- detpic/program.asm | 3 ++- detpic/tick.asm | 14 +++++++------- detpic/tick.fin | 3 ++- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/detpic/Makefile b/detpic/Makefile index 1604c08..05d86b9 100644 --- a/detpic/Makefile +++ b/detpic/Makefile @@ -6,7 +6,7 @@ PROGRAMS= program OBJS_program= vectors.o panic.o routines-led.o i2clib+panic.o \ misc.o detect.o variables.o points.o serout.o \ syncwrite.o mascan.o energy.o \ - reverse.o nmra-stream.o + reverse.o nmra-stream.o tick.o XCODEN_program= morse XCODE1_program= ours+pindata diff --git a/detpic/points.fin b/detpic/points.fin index f17c081..cbd978b 100644 --- a/detpic/points.fin +++ b/detpic/points.fin @@ -4,5 +4,6 @@ extern points_local_intrl extern points_needwrite extern points_getwritebyte - extern cdu_init extern got_pointed + extern cdu_init + extern cdu_tick diff --git a/detpic/program.asm b/detpic/program.asm index 46ce961..bce6761 100644 --- a/detpic/program.asm +++ b/detpic/program.asm @@ -75,12 +75,13 @@ master_init call nmra_init call serialtxfc_init call mascan_init + call tick_init return ;---------------------------------------- master_interrupt_low enter_interrupt_low - call ticker_intrl + call tick_intrl call nmra_serialrx_intrl call serialtx_intrl call points_local_intrl diff --git a/detpic/tick.asm b/detpic/tick.asm index 1424ae3..9c35fb0 100644 --- a/detpic/tick.asm +++ b/detpic/tick.asm @@ -1,18 +1,18 @@ ;====================================================================== -; TICKER - regular 10ms timer interrupt +; TICK - REGULAR 10MS TIMER INTERRUPT ; -; after ticker_init, and after interrupts enabled, +; after tick_init, and after interrupts enabled, ; we call _tick every 10ms. include common.inc code ;---------------------------------------- -ticker_init -; Timer 2 any used for ticker - mov_lw tick_timer2scale ; disable (in case already running) +tick_init +; Timer 2 any used for tick + mov_lw tick_master_t2scale ; disable (in case already running) mov_wf T2CON - mov_lw tick_timer2period + mov_lw tick_master_t2cycles mov_wf PR2 bc_f PIR1, TMR2IF ; clear any previous interrupt bc_f IPR1, TMR2IP ; low priority @@ -21,7 +21,7 @@ ticker_init return ;---------------------------------------- -ticker_intrl +tick_intrl bt_f_if0 PIR1, TMR2IF return ; we have an interrupt diff --git a/detpic/tick.fin b/detpic/tick.fin index 7cf7f0c..18adad3 100644 --- a/detpic/tick.fin +++ b/detpic/tick.fin @@ -1 +1,2 @@ - extern ticker_intrl + extern tick_init + extern tick_intrl -- 2.30.2