Heart Beat Monitor With 8051

download Heart Beat Monitor With 8051

of 4

Transcript of Heart Beat Monitor With 8051

  • 8/3/2019 Heart Beat Monitor With 8051

    1/4

    Heart Beat Monitor with 8051

    The use of microcontroller is in every field even we can use it in the design andfabrication of biomedical equipments. A little example is here. The microcontroller

    at89s51 (8051) is here used to develop a heart beat monitoring system. By placing your

    finger in between a LED and photo resistance, we can detect the pulses of heart, theanalog voltages are further processed with an operational amplifier LM 358, this chip has

    two built in OPAMPs. The TTL pulses or digital pulse are then feed to the external

    interrupt of microcontroler 8051. By using a software counter in the code , we can countthe pulses, and the result the process is displayed on an LCD (2 line 16 characters). The

    schematic circuit diagram of heart beat monitor is shown below and the code ( c

    program) in c language using keil C51 uv3 is also shown. This is only test project and

    any one can copy from it. But no one will be responsible of any loss.

    #include//reg51.hsbit lcd_d7 = P2^3;//LCD interface in 4 bit mode

  • 8/3/2019 Heart Beat Monitor With 8051

    2/4

  • 8/3/2019 Heart Beat Monitor With 8051

    3/4

    if(min>=1){gotoxy(0,1);delay(500);bt=t1;lcd_send_byte((bt/100)+48,1);r=bt%100;lcd_send_byte((r/10)+48,1);lcd_send_byte((r%10)+48,1);delay(500);min=0;}}}void initializelcd(void){delay(16000);lcd_en = 1;lcd_send_byte(0x30,0);

    delay(1000);lcd_en = 0;delay(1000);lcd_en = 1;lcd_send_byte(0x30,0);delay(1000);lcd_en = 0;delay(1000);lcd_en = 1;lcd_send_byte(0x30,0);delay(1000);lcd_en = 0;delay(1000);lcd_en = 1;lcd_send_byte(0x20,0);delay(1000);lcd_en = 0;delay(1000);lcd_en = 1;lcd_send_byte(0x28,0);delay(500);lcd_send_byte(0x10,0);delay(500);lcd_send_byte(0x01,0);delay(500);lcd_send_byte(0x06,0);delay(500);

    lcd_send_byte(0x0c,0);delay(500);lcd_send_byte(0x1c,0);delay(500);lcd_send_byte(0x01,0);delay(500);}

    void delay(ndelay)int ndelay;

  • 8/3/2019 Heart Beat Monitor With 8051

    4/4

    {int idelay;

    for (idelay=0;idelay