10
Pulse measurement with 8051 BY Kaviyarasan.s

Pulse measurement with 8051

Embed Size (px)

Citation preview

Page 1: Pulse measurement with 8051

Pulse measurement with 8051

BYKaviyarasan.s

Page 2: Pulse measurement with 8051

Heart beat monitor using 8051

Page 3: Pulse measurement with 8051
Page 4: Pulse measurement with 8051
Page 5: Pulse measurement with 8051
Page 6: Pulse measurement with 8051

Lth1550-01

Page 7: Pulse measurement with 8051

working

Page 8: Pulse measurement with 8051
Page 9: Pulse measurement with 8051

Program:ORG 000H // originMOV DPTR, #LUT // moves starting address of LUT to

DPTRMOV P1, #00000000B // sets P1 as output portMOV P0, #00000000B // sets P0 as output portMAIN: MOV R6, #230D // loads register R6 with 230DSETB P3.5 // sets P3.5 as input portMOV TMOD, #01100001B // Sets Timer1 as Mode2

counter & Timer0 as Mode1timerMOV TL1, #00000000B // loads TL1 with initial valueMOV TH1, #00000000B // loads TH1 with initial value

Page 10: Pulse measurement with 8051

SETB TR1 // starts timer (counter) 1BACK: MOV TH0, #00000000B // loads initial value to

TH0MOV TL0, #00000000B // loads initial value to TL0SETB TR0 // starts timer 0HERE: JNB TF0, HERE // checks for Timer 0 roll overCLR TR0 // stops Timer0CLR TF0 // clears Timer Flag 0DJNZ R6, BACKCLR TR1 // stops Timer (counter)1CLR TF0 // clears Timer Flag 0CLR TF1 // clears Timer Flag 1ACALL DLOOP // Calls subroutine DLOOP for displaying

the countSJMP MAIN // jumps back to the main loop