This is what i got so far for the project which im doing using
a pic16f870 microcontroller.
It is a heartbeat monitor which increments the counter everytime
an analogue signal from the heart is registered.This is the
first part where im only reading each heartbeat and incr. the
counter. Am i on the right track or way off? also imstill confused
about how to go about making an interrupt that after a minute the
value in the counter will be displayed,any tips will be helpful.
__________________________________________________ ____________
bsf status, rp0
clrw
movwf ADCON1 ;Setting up analogue inputs
movlw 01h ;Choosing RA0
movwf TRISA ;as analogue input
bcf status, rp0
;
;
heartb btfsc porta,0 ;Testing for pulse if no pulse skip next instr
goto moni ;Goto monitor the no of heartbeats
goto heartb
;
moni incf count,1 ;Counting the no of heartbeats
call dly ;calling a 1 millisec delay
goto heart
;One millisecond delay so that the pulse has gone low again.
Bookmarks