incf Tachperiod,f ;this routine counts pulses on ra4,t0ck, to calc rpm.
movf Tachperiod,w; 1 Tachperiod = 10msec, so 20 = 200mSec
; handle 6cylnders setting
btfsc RPM6cyl,0; skip if 6cylinders not selected, else
addlw .10; makes next sublw .30 seem like a sublw .20 for a net 200 msec period.
sublw .30
skpz
goto ISR1 ;
;this defaults to a 4CYL RPM reading, .30 sec updates.
clrf Tachperiod;
movf TMR0,w ; load undivided timer0
movwf Timer0 ; capture timer 0 into gpr.
bcf STATUS,C
;check for 8cyl setting (1:2)
btfsc RPM8cyl,1 ; if set then
rrf Timer0,f ; div by 2 , else
clrf TMR0 ; reset Timer0
bcf STATUS,C
;check for ecu signal (1:1) setting
btfsc RPMecu,3
rlf Timer0,f; X 2 for ECU signal
;check for Coil on plug (4:1) setting
btfsc RPMplug,4
rlf Timer0,f; x 2
bcf STATUS,C
btfsc RPMplug,4
rlf Timer0,f; x4 for RPM from plug pack