diff code_part1/OSTC_code_asm_part1/MAIN.ASM @ 377:be71e563ac09 64kByte Logbook

First gas can be reset to 0m, test for timer1 race condition
author heinrichsweikamp
date Mon, 13 Jun 2011 07:45:59 +0200
parents b5b030c1ae7e
children 51baf8777b73
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/MAIN.ASM	Sun Jun 12 21:27:07 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/MAIN.ASM	Mon Jun 13 07:45:59 2011 +0200
@@ -68,6 +68,10 @@
 		btfsc	INTCON3,INT1IF				; switch right
 		call	switch_right_int
 
+; Test for race condition
+		btfsc	PIR1,TMR1IF					;Timer1 INT (external 32.768kHz Clock)
+		call	timer1int
+
 		movff   prod_temp+1,PRODH
 		movff   prod_temp+0,PRODL
 		movff	wreg_temp,WREG				;restore working register