Académique Documents
Professionnel Documents
Culture Documents
Infrared RX
Compar Microco
ator and ntroller LCD
Finger
filter
Infrared TX
Figure shows the block diagram of the proposed device. Basically, the
device consists of an LED and an LDR. The transmitter-sensor pair is
clipped on one of the fingers of the subject. The LED emits infrared light
to the finger of the subject. The LDR detects this light beam and measures
the change of blood volume through the finger artery. This signal, which
is in the form of pulses is then amplified and filtered suitably and is fed to
a low-cost microcontroller for analysis and display. The microcontroller
counts the number of pulses over a fixed time interval and thus obtains
the heart rate of the subject. Several such readings are obtained over a
known period of time and the results are averaged to give a more accurate
reading of the heart rate. The calculated heart rate is displayed on an LCD
in beats-per-minute in the following format:
Rate = nnn bpm
Where nnn is an integer between 1 and 999.
CHAPTER 1
INTRODUCTION
This chapter gives the brief description about the need for wireless patient
monitoring system and its importance. This chapter also gives the brief
description about scope of the project and design methodology.
Patient Monitoring System is a process where a surgeon can continuously
monitor more than one patient at a time in remote place.
CHAPTER 2
SYSTEM DESCRIPTION
2.1 INTRODUCTION
Embedded systems are one of the emerging technologies which are
touching every nook and corner of the mind. “It is impossible to live
without these embedded gadgets”-says ELECTRONICS magazine. From
the above statement, the liveliness of embedded system can be
understood. Data communications is one of the most rapidly growing
commercial market areas today, especially “wireless communications”. In
the past few years, wireless data communications has grown from an
obscure and expensive curiosity into a practical and affordable
communication and networking technology. The convenience of wireless
is very appealing as not to deal with running cables to and from devices
in order to interconnect them, and wireless devices can be moved to any
location within the transmission range, while still being able to
communicate and broadcast data. Due to this, it is expected that wireless
data communications will become even more popular and more
extensively used in the medical field. Currently the most popular method
of wireless communications is radio frequency transmission. As these
devices have a very low power consumption and power output, perhaps
more importantly devices can achieve good data transmission rates.
2.2 BLOCK DIAGRAM
INTRODUCTION
Some severe diseases and disorders e.g. heart failure needs close and
continual monitoring procedure after diagnosis, in order to prevent
mortality or further damage as secondary to the mentioned diseases or
disorders. Monitoring these types of patients, usually, occur at hospitals
or healthcare centers. Heart arrhythmias for instance, in many cases, need
continual long-term monitoring. However, the patients are often too early
released, owing to need of hospital bed for another patient on the waiting
list, who needs to be hospitalized immediately.
SYSTEM DESCRIPTION
2.1 INTRODUCTION
Transmitter
Heart Beat
Sensor
Serial
Micro controller
Switcher
Oscillator RS 232
P89V51RD2
GSM
Regulate DC
Modem
Power
Supply
Receiver
Mobile
This GSM-Modem should be a plug and play GSM 900 / GSM 1800
/ GSM 1900 modem. A direct and easy integration with RS232 and with
in voltage range for the power supply.
Heart beat sensor is designed to give digital output of heat beat when
a finger is placed on it. When the heart beat detector is working, the beat
LED flashes in unison with each heart beat. This digital output can be
connected to microcontroller directly to measure the Beats Per Minute
(BPM) rate. It works on the principle of light modulation by blood flow
through finger at each pulse.
HARDWARE DESCRIPTION
The transformer 230Volts will be stepped down to 12-0-12 one side of the
12V is given to the 7805 and Lm317.In this project the microcontroller
requires +5V power supply. The design description of power supply is
given below.
The +5 Volt and 3.8V power supply is based on the commercial 7805 &
Lm317 voltage regulator IC. This IC contains all the circuitry needed to
accept any input voltage from 8 to 18 volts and produce a steady +5 volt
& 3.8volt output, accurate to within 5% (0.25 volt). It also contains
current-limiting circuitry and thermal overload protection, so that the IC
won't be damaged in case of excessive load current; it will reduce its
output voltage instead.
The LED and its series resistor(220ohm) serve as a pilot light to indicate
when the power supply is on and also helps to the reservoir capacitor is
completely discharged after power is turned off. Then I know it's safe to
remove or install components for the next experiment.
3.1.1 LM317:
3.1.2 LM7805:
Bear this in mind when you build this version of the power supply. If the
7805 will be in the open air it may be okay without a heat sink, but if you
install it inside an enclosure, it will require one. If the enclosure is
aluminum, simply attach the 7805 to the enclosure, it will act as a heat
sink.
1. General description
2. Features
80C51 CPU
5 V operating voltage from 0 MHz to 40 MHz
16/32/64 kB of on-chip flash user code memory with ISP and IAP
Supports 12-clock (default) or 6-clock mode selection via software
or ISP
SPI and enhanced UART
PCA with PWM and capture/compare functions
Four 8-bit I/O ports with three high-current port 1 pins (16 mA
each)
Three 16-bit timers/counters
Programmable watchdog timer
Eight interrupt sources with four priority levels
Second DPTR register
Low EMI mode (ALE inhibit)
TTL- and CMOS-compatible logic levels
Brownout detection
Low power modes
Power-down mode with external interrupt wake-up
Idle mode
3.Block diagram of P89V51RD2
P89V51RB2/RC2/RD2
4. PIN DESCRIPTION
GND: Ground.
Port 0:
Port 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1
output buffers can sink/source four TTL inputs. When 1s are written to
Port 1 pins they are pulled high by the internal pull-ups and can be used
as inputs. As inputs, Port 1 pins that are externally being pulled low will
source) because of the internal pull-ups. Current (IIL Port 1 also receives
the low-order address bytes during Flash programming and verification.
Port 2:
Memory organization
The device has separate address spaces for program and data memory.
There are two internal flash memory blocks in the device. Block 0
has 16/32/64 kB and is organized as 128/256/512 sectors, each sector
consists of 128 B. Block 1 contains the IAP/ISP routines and may be
enabled such that it overlays the first 8 kB of the user code memory. The
overlay function is controlled by the combination of the Software Reset
Bit (SWR) at FCF.1 and the Bank Select Bit (BSEL) at FCF.0. The
combination of these bits and the memory source used for instructions is
shown in Table below.
Code memory bank selection
At initial power up, the port pins will be in a random state until the
oscillator has started and the internal reset algorithm has weakly pulled all
pins high. Powering up the device without a valid reset could cause the
MCU to start executing instructions from an indeterminate location. Such
undefined states may inadvertently corrupt the code in the flash. A system
reset will not affect the 1 kB of on-chip RAM while the device is running,
however, the contents of the on-chip RAM during power up are
indeterminate. When power is applied to the device, the RST pin must be
held high long enough for the oscillator to start up (usually several
milliseconds for a low frequency crystal), in addition to two machine
cycles for a valid power-on reset. An example of a method to extend the
RST signal is to implement a RC circuit by connecting the RST pin to
VDD through a 10 mF capacitor and to VSS through an 8.2 kW resistor
as shown in Figure 5. Note that if an RC circuit is being used, provisions
should be made to ensure the VDD rise time does not exceed 1 ms and the
oscillator start-up time does not exceed 10 ms. For a low frequency
oscillator with slow start-up time the reset signal must be extended in
order to account for the slow start-up time. This method maintains the
necessary relationship between VDD and RST to avoid programming at
an indeterminate location, which may cause corruption in the code of the
flash. The power-on detection is designed to work during initial power up,
before the voltage reaches the brownout detection level. The POF flag in
the PCON register is set to indicate an initial power up condition. The
POF flag will remain active until cleared by software. Following a power-
on or external reset the P89V51RB2/RC2/RD2 will force the SWR and
BSEL bits (FCF[1:0]) = 00. This causes the boot block to be mapped into
the lower 8 kB of code memory and the device will execute the ISP code
in the boot block and attempt to auto baud to the host. If the auto baud is
successful the device will remain in ISP mode. If, after approximately 400
ms, the auto baud is unsuccessful the boot block code will check to see if
the SoftICE flag is set (from a previous programming operation). If the
SoftICE flag is set the device will enter SoftICE mode. If the SoftICE flag
is cleared, the boot code will execute a software reset causing the device
to execute the user code from block 0 starting at address 0000H. Note that
an external reset applied to the RST pin has the same effect as a power-
on reset.
Software reset
A software reset is executed by changing the SWR bit (FCF.1) from ‘0’
to ‘1’. A software reset will reset the program counter to address 0000H
and force both the SWR and BSEL bits (FCF[1:0]) = 10. This will result
in the lower 8 kB of the user code memory being mapped into the user
code memory space. Thus the user's code will be executed starting at
address 0000H. A software reset will not change WDTC.2 or RAM data.
Other SFRs will be set to their reset values.
Watchdog reset
Like a brownout detect reset, the watchdog timer reset will clear the BSEL
bit (FCF.0) but will not change the SWR bit (FCF.1) and therefore will
not change the banking of the lower 8 kB of user code memory space. The
state of the SWR and BSEL bits after different types of resets is shown in
below This results in the code memory bank selections as shown.
Data RAM memory
The data RAM has 1024 B of internal memory. The device can also
address up to 64 kB for external data memory.
1. The lower 128 B of RAM (00H to 7FH) are directly and indirectly
addressable.
Since the upper 128 B occupy the same addresses as the SFRs, the RAM
must be accessed indirectly. The RAM and SFRs space are physically
separate even though they have the same addresses.
Internal and external data memory structure
The device has two 16-bit data pointers. The DPTR Select (DPS) bit in
AUXR1n determines which of the two data pointers is accessed. When
DPS = 0, DPTR0 is selected; when DPS = 1, DPTR1 is selected. Quickly
switching between the two data pointers can be accomplished by a single
INC instruction on AUXR1.
1.Flash organization
When the microcontroller programs its own flash memory, all of the
low level details are handled by code that is contained in block 1. A user
program calls the common entry point in the block 1 with appropriate
parameters to accomplish the desired operation. Boot block operations
include erase user code, program user code, program security bits, etc.
The ISP feature allows for a wide range of baud rates to be used in your
application, independent of the oscillator frequency. It is also adaptable to
a wide range of oscillator frequencies. This is accomplished by measuring
the bit-time of a single bit in a received character. This information is then
used to program the baud rate in terms of timer counts based on the
oscillator frequency. The ISP feature requires that an initial character (an
uppercase U) be sent to the P89V51RB2/RC2/RD2 to establish the baud
rate. The ISP firmware provides auto-echo of received characters. Once
baud rate initialization has been performed, the ISP firmware will only
accept Intel Hex-type records
UARTs
Mode 0
Serial data enters and exits through RXD and TXD outputs the shift clock.
Only 8 bits are transmitted or received, LSB first. The baud rate is fixed
at 1¤6 of the CPU clock frequency. UART configured to operate in this
mode outputs serial clock on TXD line no matter whether it sends or
receives data on RXD line.
Mode 1
Mode 2
Mode 3
SPI features
SPI description
Watchdog timer
The WDT in the device uses the system clock (XTAL1) as its time base.
So strictly speaking, it is a Watchdog counter rather than a WDT. The
WDT register will increment every 344064 crystal clocks. The upper 8-
bits of the time base register (WDTD) are used as the reload register of
the WDT. The WDTS flag bit is set by WDT overflow and is not changed
by WDT reset. User software can clear WDTS by writing ‘1' to it. Figure
below provides a block diagram of the WDT. Two SFRs (WDTC and
WDTD) control WDT operation. During Idle mode, WDT operation is
temporarily suspended, and resumes upon an interrupt exit from idle. The
time-out period of the WDT is calculated as follows: Period = (255 -
WDTD) ´ 344064 ´ 1 / fCLK(XTAL1) where WDTD is the value loaded
into the WDTD register and fosc is the oscillator frequency.
Idle mode
Idle mode is entered setting the IDL bit in the PCON register. In Idle
mode, the program counter (PC) is stopped. The system clock continues
to run and all interrupts and peripherals remain active. The on-chip RAM
and the special function registers hold their data during this mode The
device exits Idle mode through either a system interrupt or a hardware
reset. Exiting Idle mode via system interrupt, the start of the interrupt
clears the IDL bit and exits Idle mode. After exit the Interrupt Service
Routine, the interrupted program resumes execution beginning at the
instruction immediately following the instruction which invoked the Idle
mode. A hardware reset starts the device similar to a power-on reset.
Power-down mode
The Red high intensity light emitted by led initially falls on LDR .This is
the condition where the heartbeat is calibrated to zero using resistor R16.
When a patient places his finger in between LED and LDR the light is
restricted by the finger .The intensity of light penetration decreases if the
blood is pumped into the finger .If the blood is not pumped then the light
intensity is high .This high and low light intensity helps to measure
heartbeat . Actually light falling on LDR cuts due to blood movement .The
duration of light disturbed is measured which gives the time duration of
each heart beat pulse ,inverse of this time gives the heartbeat count per
minute .This signal is amplified in two stages using dual operational
amplifiers.R17 resistor is used to adjust the square wave pulse obtained,
C4 is used as feedback capacitor .The output after amplification is
obtained at pin number 7 of OP-AMP and fed to microcontroller.The
Heart Beat Sensor provides a simple way to study the heart's function.
This sensor monitors the flow of blood through Finger. As the heart forces
blood through the blood vessels in the Finger, the amount of blood in the
Finger changes with time. The sensor shines a light lobe (small High
Bright LED) through the ear and measures the light that is transmitted to
LDR. The signal is amplified, inverted and filtered, in the Circuit .By
graphing this signal, the heart rate can be determined, and some details of
the pumping action of the heart can be seen on the graph.
Figure 3.3.1 shows that the blood flowing through the Finger rises at the
start of the heartbeat. This is caused by the contraction of the ventricles
forcing blood into the arteries. Soon after the first peak a second, smaller
peak is observed. This is caused by the shutting of the heart valve, at the
end of the active phase, which raises the pressure in the arteries and the
earlobe.
The heart beat is sensed with help of an LED and LDR arrangement. The
LED is a high intensity type LED. Here the LDR is the sensor. As Sensor,
a photo diode or a photo transistor can be used. The skin may be
illuminated with visible (red) or infrared LEDs using transmitted or
reflected light for detection. The very small changes in reflectivity or
in transmittance caused by the varying blood content of human tissue are
almost invisible.
FEATURES
SPECIFICATIONS:
PIN DETAILS:
Board has 3-pin connector for using the sensor. Details are marked on
PCB as below.
WORKING
The sensor consists of a super bright red LED and light detector. The
LED needs to be super bright as the maximum light must pass spread in
finger and detected by detector. Now, when the heart pumps a pulse of
blood through the blood vessels, the finger becomes slightly more opaque
and so less light reached the detector. With each heart pulse the detector
signal varies. This variation is converted to electrical pulse. This signal is
amplified and triggered through an amplifier which outputs +5V logic
level signal. The output signal is also indicated by a LED which blinks on
each heart beat.
P 0.5 D7
P 0.4 D6
P 0.3 D5
Fig 7: 8051 and LCD interface.
Description of pins used:
RS, Register Select (Pin 4):
This pin is used to select command register and data register.
If RS =1, the data register is selected, allowing the user to send data to be
displayed on the LCD.
PIN OUT
The module that we are using is a 16 character x 2 line display that
we stock over here. It uses an ST7065C controller, which is HD44780
compatible. The figure below shows the LCD module and pin out.
The circuit diagram below shows the LCD module with the basic
“plumbing” wired up. You will notice that pin 5 (RW) is tied to ground.
This pin is use to control whether you are reading or writing to the display.
Since reading from the display is very rare, most people just tie this pin to
ground.
3.5. GSM
The GSM network was designed keeping in mind the voice activities
of the user and its main purpose was to provide voice connectivity like
Public Switched Telephone Networks but with mobility. The data
communication was of secondary importance to this network but to
support this also, designers have considered the circuit switching itself the
mechanism for transmitting data packets.
3.5.2 GSM Architecture:
3.5.4 AT COMMANDS:
1 AT commands features:-
A serial link handler is set with the following default values (factory
settings): auto baud, 8 bits data, 1 stop bit, no parity, RTS/CTS flow
control. Please use the +IPR, +IFC and +ICF commands to change these
settings.
Responses start and end with <CR><LF>, except for the ATV0 DCE
response format) and the ATQ1 (result code suppression) commands.
2 General behaviors:-
SIM card Insertion and Removal procedures are supported. There are
software functions relying on positive reading of the hardware SIM detect
pin. This pin state (open/closed) is permanently monitored. When the SIM
detect pin indicates that a card is present in the SIM connector, the product
tries to set up a logical SIM session. The logical SIM session will be set
up or not depending on whether the detected card is a SIM Card or not.
The AT+CPIN? Command delivers the following responses:
After entering the PIN (Personal Identification Number), some SIM user
data files are loaded into the product (Phonebooks, SMS status, etc.).
Please be aware that it might take some time to read a large phonebook.
The AT+CPIN? Command response comes just after the PIN is checked.
After this response user data is loaded (in background). This means that
some data may not be available just after PIN entry is confirmed by ’OK’.
The reading of phonebooks will then be refused by
“+CME ERROR: 515” or “+CMS ERROR: 515” meaning, “Please wait,
service is not available, init in progress”. This type of answer may be sent
by the product at several points:
3.1.1 Description:
This command informs the ME which character set is used by the TE. The
ME can convert each character of entered or displayed strings. This is
used to send, read or write short messages. See also +WPCS for the
phonebooks’ character sets.
3.1.2 Syntax:
AT+CSCS=”GSM” OK
AT+CSCS=”PCCP437” OK
<Character Set>
4.1 Description:
following command:
+CME ERROR: 527 (Please wait, and retry your selection later)
Numeric <oper>) s]
4.2.1 Description:
4.2.2 Syntax:
AT+CREG? +CREG:
<mode>,<stat> OK
AT+CREG=0 OK
AT+CREG=1 OK
AT+CREG=2 OK
Description:
This command is used by the application to send the text message of the
product.
5.1 Syntax:
AT+CMGS? +CMGS:
<mode>,<stat>
OK
AT+CMGS=0 OK
AT+ CMGS =1 OK
SOFTWARE DESCRIPTION
4.1.2 EMBEDDED C
4.2 PROGRAM
#include<p89v51rd2.h>
//#include<Reverse.c>
#define LINE1_ADDR 0x80
#define LINE2_ADDR 0xC0
sbit LCD_CS = P3^4;
sbit REG_SELECT = P3^5;
#define NULL_00 '\0'
#define CONTRL_Z 0x1A
enum ucsthreadState123
{
INIT_STATE = 0,
MODEM_CHK,
SIMPIN_CHK,
SIMREG_CHK,
SEND_CMNDS,HEART_BEAT_MONITORING,STOP,
NO_ACTION
}
#include<variable.h>
void main(void)
{
while(1)
{
switch(ucsthreadState)
{
case INIT_STATE:
TEST=0;
ext=0;
LCD_INIT();
buffer[14]=NULL_00;
buffer[3]=' ';
buffer[4]=' ';
buffer[5]=' ';
buffer[9]=' ';
serial_Init();
Prep_lcd_Write_Data(" Heart Beat ",LINE1_ADDR,"Project",
LINE2_ADDR);
ucsthreadState=MODEM_CHK;
break;
case MODEM_CHK :
check_Modem();
ucsthreadState=SIMPIN_CHK;
break;
case SIMPIN_CHK :
check_SIM_SIMPIN();
ucsthreadState=SIMREG_CHK;
break;
case SIMREG_CHK :
SIM_REG();
ucsthreadState=SEND_CMNDS;
break;
case SEND_CMNDS :
TxdCommandToModem("AT+CMGF=1\r\n");
MSDelay(10);
TxdCommandToModem("AT+CMGD=1,4\r\n"); //Delete
All SMS
MSDelay(300);
}
MSDelay(100);
Prep_lcd_Write_Data(" Heart Beat ",LINE1_ADDR,"Testing Stop",
LINE2_ADDR);
ucsthreadState=STOP;
break;
case STOP :
byte_hex_to_bcd_conversion(ucpulseCount);
buffer[6]=ucbcd100;
buffer[7]=ucbcd10;
buffer[8]=ucbcd1;
//Prep_lcd_Write_Data(" ISHWAR ",LINE1_ADDR," ",
LINE2_ADDR);
if(stop)
{
if((xttemp<65)||(xttemp>80))
{
ABNORM[9]=' ';
ABNORM[10]=temp100;
ABNORM[11]=temp10;
ABNORM[12]=temp1;
Sms_CommandToModem(&ABNORM[0],1);
MSDelay(10);
Sms_CommandToModem(&ABNORM[0],2);
MSDelay(10);
xttemp=0;
TR0 = 0;
TL0 = RELOADLOW0;
TH0 = RELOADHI0;
TR0 = 1;
}
else if((xttemp>=65) && (xttemp<=80))
{
NORM[7]=' ';
NORM[8]=temp100;
NORM[9]=temp10;
NORM[10]=temp1;
Sms_CommandToModem(&NORM[0],1);
MSDelay(10);
Sms_CommandToModem(&NORM[0],2);
MSDelay(10);
xttemp=0;
TR0 = 0;
TL0 = RELOADLOW0;
TH0 = RELOADHI0;
TR0 = 1;
}
}
ucsthreadState=HEART_BEAT_MONITORING;
break;
}
}
}
void serial_Init(void)
{
unsigned char int_temp = 0;
////////////////////// Timer 0 10 ms init //////////////////////////
IEN0 = 0;
TR0 = 0;
TL0 = RELOADLOW0;
TH0 = RELOADHI0;
int_temp = TMOD;
int_temp |= 0X01;
TMOD = int_temp;
// TR0 = 1;
int_temp = IEN0;
int_temp |= 0x02;
IEN0 = int_temp;
TF0 = 0;
int_temp = IEN0;
int_temp |= 0x80;
IEN0 = int_temp;
if(recd_count >=MAX_RECD_CHAR)
recd_count = 0;
}
}
ucbcd1 = hex_value+0x30;
}
void LCD_INIT(void)
{
write_instr_bit(0x38);//8-bit data -2-line display
MSDelay(10);
write_instr_bit(0x0e);//cursor on
MSDelay(10);
write_instr_bit(0x01);//clear display
MSDelay(10);
write_instr_bit(0x06);//increment cursor
MSDelay(10);
}
write_instr_bit(0x01);//clear display
MSDelay_lcd(1);
write_instr_bit(Line1Addr);
void check_Modem(void)
{
unsigned char count = 0;
gbok_flag = 0;
while(1)
{
ClearRecdCharArray();
recd_count=0;
TxdCommandToModem("AT\r\n");
gbok_flag = mystr_recdchar_ncmp("OK",2);
if(gbok_flag)
break;
count++;
if(count == 10)
{
Prep_lcd_Write_Data("Modem init",LINE1_ADDR, "Fail",
LINE2_ADDR);
}
}
}
void SIM_REG(void)
{
unsigned char count = 0;
gbok_flag = 0;
ClearRecdCharArray();
recd_count = 0;
while(1)
{
MSDelay(100);
Prep_lcd_Write_Data("Network",LINE1_ADDR, "Searching.......",
LINE2_ADDR);
TxdCommandToModem("AT+CREG?\r\n");
MSDelay(20);
gbok_flag = mystr_recdchar_ncmp("+CREG:0,1",9);
if(gbok_flag)
break;
gbok_flag = mystr_recdchar_ncmp("+CREG:0,5",9);
if(gbok_flag)
break;
ClearRecdCharArray();
recd_count = 0;
count++;
if(count == 180)
Prep_lcd_Write_Data("Network",LINE1_ADDR, "Reg Failed",
LINE2_ADDR);
}
}
while((uChar2+StrLength)<MAX_RECD_CHAR-5)
{
uChar1=0x00;
while(uChar1<StrLength)
{
if(recd_char[uChar2+uChar1]!=*(chkString+uChar1))
break;
uChar1++;
}
if(uChar1==StrLength)
return(1);
uChar2++;
}
return(0);
}
void ClearRecdCharArray(void)
{
unsigned char gucloop;
if(ucMGMTIndex == 1)
{
Prep_lcd_Write_Data("Sending.SMS.....",LINE1_ADDR,&ucOwnerM
GMTNum1[9], LINE2_ADDR);
TxdCommandToModem(&ucOwnerMGMTNum1[0]);
}
if(ucMGMTIndex == 2)
{
Prep_lcd_Write_Data("Sending.SMS.....",LINE1_ADDR,&ucOwnerM
GMTNum2[9], LINE2_ADDR);
TxdCommandToModem(&ucOwnerMGMTNum2[0]);
}
MSDelay(50);
ClearRecdCharArray();
recd_count = 0;
while(*s!=NULL_00)
{
SBUF = *s;
MSDelay(1);
s++;
}
SBUF = CONTRL_Z;
MSDelay(10);
s++;
SBUF = CARRIAGE_RETURN;
MSDelay(10);
while((!mystr_recdchar_ncmp("OK",2)) &&
(!mystr_recdchar_ncmp("ERROR",5)));
if(mystr_recdchar_ncmp("OK",2))
Prep_lcd_Write_Data("Message Sent ",LINE1_ADDR,
"Successfully ", LINE2_ADDR);
else if(mystr_recdchar_ncmp("ERROR",5))
Prep_lcd_Write_Data("Message Sending",LINE1_ADDR, "Failed
", LINE2_ADDR);
MSDelay(50);
ClearRecdCharArray();
recd_count = 0;
}
void TxdCommandToModem(unsigned char *s)
{
while(*s!=NULL_00)
{
SBUF = *s;
MSDelay(1);
s++;
}
SBUF = CARRIAGE_RETURN;
SBUF = END_OF_LINE;
MSDelay(10);
}
1. INITIAL DISPLAY
HEART BEAT
PROJECT
NETWORK SEARCHING…
4.4.APPLICATIONS
CHAPTER 6
6.1 CONCLUSION
This algorithm deals only with single patient. This algorithm can
be extended to multiple doctors and multiple patients.
In future we can also design PC software to analyze this received
signal and generate the report and this can be sent back to the
doctor.
With the connection established between two ends we can also
send patient’s body temperature, blood pressure to doctor’s side.
In addition to ECG rate, we can also send EEG
(electroencephalogram) and EMG (electromyogram) signals for
analyzing.
Using GSM technology we can display the ECG signal on doctor’s
mobile phone.
APPENDIX:
7.REFERENCES
Kenneth J. Ayala – The 8051 Microcontroller Architecture,
Programming and Applicatins, 2nd Edition, Penarm International,
1996
www.Wikipidea.com
www.google.com