You are on page 1of 59

MICROCONTROLLER BASED PATIENT MEDICINE

REMINDER SYSTEM
B.Tech. MINI Project Report

AMRITHA P.SHYAM
GUJJULA KAVYA REDDY
MONICA MADDUKURI
 

DEPARTMENT OF BIO-MEDICAL ENGINEERING


GOKARAJU RANGARAJU INSTITUTE OF
ENGINEERING AND TECHNOLOGY
(Affiliated to Jawaharlal Nehru Technological University)
HYDERABAD 500 090
2010  
MICROCONTROLLER BASED PATIENT MEDICINE
REMINDER SYSTEM
Project Report Submitted in Partial Fulfillment of
the Requirements for the Degree of
Bachelor of Technology
in
BioMedical Engineering
by

AMRITHA P.SHYAM(Roll No. 07241A1102)


GUJJULA KAVYA REDDY(Roll No. 07241A1114)
MONICA MADDUKURI (Roll No. 07241A1118)

DEPARTMENT OF BIO-MEDICAL ENGINEERING


GOKARAJU RANGARAJU INSTITUTE OF
ENGINEERING AND TECHNOLOGY
(Affiliated to Jawaharlal Nehru Technological University)
HYDERABAD 500 090
2010  
Department of BioMedical Engineering
Gokaraju Rangaraju Institute of Engineering and Technology
(Affiliated to Jawaharlal Nehru Technological University)
Hyderabad 500 090
2010

Certificate

This is to certify that this project report entitled MICROCONTROLLER BASED PATIENT
MEDICINE REMINDER SYSTEM by AMRITHA P.SHYAM(Roll No. 07241A1102)GUJJULA
KAVYA REDDY(Roll No. 07241A1114),MONICA MADDUKURI(Roll No. 07241A1118) submitted
in partial fulfillment of the requirements for the degree of Bachelor of Technology in BioMedical
Engineering of the Jawaharlal Nehru Technological University, Hyderabad, during the academic year
2010, is a bonafide record of work carried out under our guidance and supervision.

The results embodied in this report have not been submitted to any other University or Institution
for the award of any degree or diploma.

(Guide) (External Examiner) (Head of Department)

T.Padma T.Padma
Associate Professor
 

.
ACKNOWLEDGEMENTS

We wish to place on record our sincere thanks to,Ms. D.Swathi


Assistant Professor, Bio medical Engineering Department, Gokaraju
Rangaraju Institute of Engineering and Technology, Bachupally,
Hyderabad for her valuable guidance to take up this project.

We express our deep sense of gratitutde to , Mr E. Suresh Kumar


Assistant Professor, Bio medical Engineering Department, Gokaraju
Rangaraju Institute of Engineering and Technology, Bachupally,
Hyderabad for his esteem guidance,and valuable comments throughout this
dissertation.

We wish to take this opportunity to express our immense gratitude to


Smt.T.Padma, Associate Professor & Head of the Department at GRIET,
Bachupally,Hyderabad for her constant support and encouragement.

Last but not least we express our gratitude and indebtness to our
classmates and to all the faculty members of Biomedical Engineering
Department at GRIET, Bachupally,Hyderabad for their constant support
throughout this entire period.
CONTENTS
ABSTRACT

1. INTRODUCTION

2. CIRCUIT DIAGRAM

3. BLOCK DIAGRAM

4. TOOLS USED

4.1 SOFTWARE TOOLS


4.2 HARDWARE TOOLS

5. DECRIPTION OF COMPONENTS

5.1 KEIL COMPILER


5.2 AT89S52 MICROCONTROLLER
5.3 DS1307 RTC
5.4 24C04 SQUARE EEPROM
5.5 11.0592 CRYSTAL OSCILLATOR
5.6 MAX232
5.7 ORCAD
5.8 BUZZER
5.9 LCD

6. IMPLEMENTATION

6.1 WORKING
6.2 PROGRAM

7. APPLICATIONS

8. CONCLUSION

9. REFERENCE
ABSTRACT

In general, most of the patients forget to take the appropriate prescribed medication at the
required time. There are occasions when patients remember to take medicines at the stipulated time
but forget which pill has to be taken at that particular time. This poses a big problem as it affects the
dosage quantum required for the patient that results in not yielding the right recovery result. It is
difficult for doctors/paramedics/attenders to monitor patients round the clock. In order to avoid these
problems, we have implemented this patient medicine reminder system.

The system allows the user to enter the prescribed timings, at which the patient has to take
the medication.This is done using a few switches and the list of medicines to be administered is
entered through the PC. This data will be stored in the EEPROM by the microcontroller. The
microcontroller continuously reads the time from the RTC .When the timings read from the RTC
equals the timings stored in the EEPROM, the system alerts the buzzer and displays the list of
medicines to be taken at that particular prescribed time on the LCD. Thus, the patient can listen to
the audio indication and see the name of the medicines on the LCD and take them on time.
CHAPTER-1

INTRODUCTION
Patient monitoring and management in critical care environments such as the ICU’s , SICU’s
and ANCU’s involve estimating the status of the patient and reacting to events that may be life
threatening. It is impossible to keep a tab on every patient throughout the day. New solutions are
needed in this field to help the doctors and the nursing staff to monitor the patients.

A critical element of this is the medicine administration and monitoring. This has been
achieved by the patient medicine reminder system. This system consists of an 8-bit microcontroller
with an in-built EEPROM and a real time circuit. This system is driven by an embedded program
that inputs predefined parameters which is processed based on the input variables entered via a user
interface device such as the PC. All the entries made by on the PC is concurrently and
simultaneously displayed on the LCD panel of the device. The logic for the processing is built into
the embedded program to initiate the alert through an audio alarm. Not only does it have an alarm
system, but also an LCD display which displays which medicine is to be taken at the reminder time.
CHAPTER-2

CIRCUIT DIAGRAM
CHAPTER-3

BLOCK DIAGRAM
Block diagram
CHAPTER-4

TOOLS USED
4.1 Software Tools:

1. Keil compiler
2. Orcad.

4.2 Hardware Tools:

1. Microcontroller AT89S52.
2. DS1307 RTC.
3. 24C04 SQUARE EEPROM(memory IC)
4. PC.
5. Buzzer
6. MAX232(RS 232)
7. LCD
8. 11.0592 Oscillator Crystal

9. Resistors- 10k ohm , 330 ohm, 8.2k ohm.

10. Capacitors- 33 picofarad , 10 microfarad.

11. Step down transformer

12. Regulator

13. Reset switch


Chapter-5

DESCRIPTION
OF COMPONENTS
5.1 Keil compiler
Keil development tools for the 8051 Microcontroller Architecture support every level of
software developer from the professional applications engineer to the student just learning about
embedded software development.

The industry-standard Keil C Compilers, Macro Assemblers, Debuggers, Real-time Kernels,


Single-board Computers, and Emulators support all 8051 derivatives.
5.2 AT89S52 MICROCONTROLLER:

A microcontroller (sometimes abbreviated µC or uC) is a small computer on a single


integrated circuit containing a processor core, memory, and programmable input/output peripherals.
Prog ram memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a
typically small amount of RAM. Microcontrollers are designed for embedded applications, in
contrast to the microprocessors used in personal computers or other general purpose applications.

8-bit Microcontroller with 8K Bytes In-System Programmable Flash The AT89S52 is a low-
power, high-performance CMOS 8-bit Microcontroller with 8K bytes of in-system programmable
Flash memory. The device is manufactured using Atmels high-density nonvolatile memory
technology and is compatible with the indus try-standard 80C51 instruction set and pinout. The on-
chip Flash allows the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory pro- grammer. By combining a versatile 8-bit CPU with in-system
programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful Microcontroller which
provides a highly-flexible and cost-effective solution to many embedded control applications. By
ATMEL Corporation
5.3 DS1307-RTC

A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit)
that keeps track of the current time. Although the term often refers to the devices in personal
computers, servers and embedded systems, RTCs are present in almost any electronic device which
needs to keep accurate time

Although keeping time can be done without an RTC, using one has benefits:

• Low power consumption (important when running from alternate power)


• Frees the main system for time-critical tasks
• Sometimes more accurate than other methods

Most RTCs use a crystal oscillator, but some use the power line frequency. In many cases the
oscillator's frequency is 32.768 kHz. This is the same frequency used in quartz clocks and watches,
and for the same reasons, namely that the frequency is exactly 215 cycles per second, which is a
convenient rate to use with simple binary counter circuits.

SOME FEATURES OF DS1307

• Real time clock counts seconds, minutes ,hours , date of month ,day of week
and year with leap year compensation valid up to 2100
• 56 byte nonvolatile RAM for general data storage
• 2-wrire interface (I2C)
• Automatic power fail detect
• Consumes less than 500 nA for battery back-up
at 25'C

5.4 24C04 – SQUARE EEPROM(Memory IC)

EEPROM (also written E2PROM and pronounced "e-e-prom," "double-e prom" or simply
"e-squared") stands for Electrically Erasable Programmable Read-Only Memory and is a type of
non-volatile memory used in computers and other electronic devices to store small amounts of data
that must be saved when power is removed, e.g., calibration tables or device configuration.

When larger amounts of static data are to be stored (such as in USB flash drives) a specific
type of EEPROM such as flash memory is more economical than traditional EEPROM devices.
EEPROMs are realized as arrays of floating-gate transistors.

EEPROM is user-modifiable read-only memory (ROM) that can be erased and


reprogrammed (written to) repeatedly through the application of higher than normal electrical
voltage generated externally or internally in the case of modern EEPROMs. Unlike EPROM chips,
EEPROMs do not need to be removed from the computer to be modified. However, an EEPROM
chip has to be erased and reprogrammed in its entirety, not selectively. It also has a limited life - that
is, the number of times it can be reprogrammed is limited to tens or hundreds of thousands of times.
In an EEPROM that is frequently reprogrammed while the computer is in use, the life of the
EEPROM can be an important design consideration

Features

• Low-voltage and Standard-voltage Operation


– 2.7 (VCC = 2.7V to 5.5V)
– 1.8 (VCC = 1.8V to 5.5V)
• Internally Organized 128 x 8 (1K), 256 x 8 (2K), 512 x 8 (4K),
1024 x 8 (8K) or 2048 x 8 (16K)
• Two-wire Serial Interface
• Schmitt Trigger, Filtered Inputs for Noise Suppression
• Bidirectional Data Transfer Protocol
• 100 kHz (1.8V) and 400 kHz (2.7V, 5V) Compatibility
• Write Protect Pin for Hardware Data Protection
• 8-byte Page (1K, 2K), 16-byte Page (4K, 8K, 16K) Write Modes
• Partial Page Writes Allowed
• Self-timed Write Cycle (5 ms max)
• High-reliability
– Endurance: 1 Million Write Cycles
– Data Retention: 100 Years
• Automotive Devices Available
• 8-lead JEDEC PDIP, 8-lead JEDEC SOIC, 8-lead Ultra Thin Mini-MAP (MLP 2x3), 5-lead
SOT23, 8-lead TSSOP and 8-ball dBGA2 Packages
• Die Sales: Wafer Form, Waffle Pack and Bumped Wafers

5.5 11.0592- Crystal Oscillator:

Crystal oscillator creates an electrical signal with a very precise frequency 11.0952MHz
Specifications:

Model :CXO\VCXO

Frequency range:1.000125.000MHz

Supply voltage:3.3V dc+5% / 5.0V dc+5%

Dimensions: DIP-14/ DIP-8

Ts :<10ms

Operation temperature: -10+60/-20+70

Storage temperature:-40+85

Frequency stability:+25ppm/+50ppm/+100ppm

Symmetry:40%60% 45%55%

Output level: TTL/HCMOS

Output load: 15pf 50pf

Output 0 level:0.5V

Output 1 level:>4.5V(5.0V)/>2.4V(3.3V)
5.6 MAX 232
The MAX220–MAX249 family of line drivers/receivers is intended for all EIA/TIA-232E
and V.28/V.24 communications interfaces, particularly applications where ±12V is not available.

These parts are especially useful in battery-powered systems, since their low-power shutdown
mode reduces power dissipation to less than 5µW. The MAX225, MAX233, MAX235, and
MAX245/MAX246/MAX247 use no external components and are recommended for applications
where printed circuit board space is critical

KEY FEATURES:

• For Low-Voltage, Integrated ESD Applications


MAX3222E/MAX3232E/MAX3237E/MAX3241E/MAX3246E: +3.0V to +5.5V, Low-
Power, Up to 1Mbps, True RS-232 Transceivers Using Four 0.1µF External Capacitors
(MAX3246E Available in a UCSP™ Package)
• For Low-Cost Applications
MAX221E: ±15kV ESD-Protected, +5V, 1µA, Single RS-232 Transceiver with
AutoShutdown™

APPLICATIONS:

• Battery-Powered RS-232 Systems


• Interface Translation
• Low-Power Modems
• Multidrop RS-232 Networks
• Portable Computing

5.7 OrCAD

OrCAD is a proprietary software tool suite used primarily for electronic design automation.
The software is used mainly to create electronic prints for manufacturing of printed circuit boards, by
electronic design engineers and electronic technicians to manufacture electronic schematics and
diagrams, and for their simulation.

The name OrCAD is a portmanteau, reflecting the software's origins: Oregon + CAD.

The OrCAD product line is fully owned by Cadence Design Systems. The latest iteration has
the ability to maintain a database of available integrated circuits. This database may be updated by
the user by downloading packages from component manufacturers, such as Analog Devices or Texas
Instruments.

5.8 Buzzer
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or electronic$. Typical uses of buzzers and beepers include alarms, timers and
confirmation of user input such as a mouse click or keystroke.

5.9 LIQUID CRYSTAL DISPLAY


A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the
light modulating properties of liquid crystals (LCs). LCs do not emit light directly.

They are used in a wide range of applications including: computer monitors,


television, instrument panels, aircraft cockpit displays, signage, etc. They are common in consumer
devices such as video players, gaming devices, clocks, watches, calculators, and telephones. LCDs
have displaced cathode ray tube (CRT) displays in most applications. They are usually more
compact, lightweight, portable, less expensive, more reliable, and easier on the eyes. They are
available in a wider range of screen sizes than CRT and plasma displays, and since they do not use
phosphors, they cannot suffer image burn-in.

LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical
power consumption enables it to be used in battery-powered electronic equipment. It is an
electronically-modulated optical device made up of any number of pixels filled with liquid crystals
and arrayed in front of a light source (backlight) or reflector to produce images in colour or
monochrome.

 
CHAPTER-6

IMPLEMENTATION

6.1 WORKING
The working of this system is very simple and user friendly.

When the ac mains is switched on, a 12 volts supply is given to the transformer. This voltage
is then stepped down to 5 volts and sent to the power supply board. Here , the ac volt is converted to
dc using a series of resistors and a rectifier network. The capactive network then filters the dc
voltage. The regulated output is sent finally to the micro controller board.

In the micro controller board the AT89S52 microcontroller is pre embedded with a software
program using a keil compiler. The input of the micro controller is given from the oscillating crystal
11.0592 via the pins X1, X2(18,19). The entire system is further interfaced to a pc using a MAX 232
port to connect the RS232 cable. A 6 pin cable is used for the interconnection between the lcd and
the micro controller via the pins (32-37). Next set of pins (8pin connectors) is used for interfacing
between the RTC (Real Time Clock) and the micro controller. Apart from this the micro controller
board is embedded with a reset switch.

In the RTC board a series of 4 switches and a memory battery is connected to the EEPROM
and the DS1307 RTC. Here, the time , date and year along with the entry data for medicines can be
given as input to the EEPROM.

When the power supply is given the leds will glow indicating that the system is running.
Now, the RS232 cable is inserted into the RS232 port of the cpu. When this is done, a hyperterminal
window is opened on the monior. The reset switch has to be turned on at this instant. The monitor
then displays a welcome note. The next step is to switch on the EM(Enter Medicine) switch. When
this is pressed, the monitor displays “ENTER MEDICINE & DOSAGE TO BE GIVEN”. At the
prescribed timings (as prescribed by the doctor/physician) the buzzer gives an alarm, along with the
simultaneous display of the name of the medication and the dosage on the lcd. The alarm can be
turned off by pressing the EM switch once again.

6.2 PROGRAM

#include<reg51.h>
#include<intrins.h>

#include "lcddisplay.h"

#define ldata P1 // P1 USED FOR LCD DATA

sbit SCL=P3^5; // SCL OF RTC

sbit SDA=P3^4; // SDA OF RTC

sbit rs =P1^2; // REGISTER SELECT

sbit en =P1^3; // ENABLE

sbit enter = P3^3;

sbit dec = P3^2;

sbit inc = P3^1;

sbit alarm_sw = P3^0;

sbit bel = P2^0;

void lcdcmd(unsigned char );

void delay (unsigned int ) ;

void lcddata(unsigned char );

void msgdisplay(unsigned char b[]);

void start(void);

void write(unsigned char,unsigned char);

unsigned char read(unsigned char);

void ptos(unsigned char );

void stop(void);

void delay(unsigned int );

void settime(void);

unsigned char COUNT,dat,add,hr,min,x,binbyte,mem1[17],B1,B2,B3;

unsigned int i;
unsigned char ch,j,d11,d22,mem,zzz,msg[17];

void delay1(unsigned int itime);

unsigned char time[7],temptime[7],alarmcheck,day,type,xy;

bit pm=0,pm1,dayselect;

void daydisplay(unsigned char);

void serial_com (unsigned char value)

SBUF=value;

while(TI==0);

TI=0;

void send_to_serial (unsigned char s[])

unsigned char r;

for(r=0;s[r]!='\0';r++)

SBUF=s[r];

while(TI==0);

TI=0;

void main()

unsigned char z;

enter=inc=dec=alarm_sw=1;
bel=0;

dayselect=0;

lcd_init();

delay(100) ;

lcd_init();

TMOD=0X20;

SCON=0X50;

TH1=0XFD;

TR1=1;

alarmcheck=1;

msgdisplay("welcome");

send_to_serial("\r\n WELCOME......:\r\n ");

z=read(0);

bel=1;

if(z==0x80)

alarmcheck=0;

start: lcdcmd(0x01);

msgdisplay(" SET THE TIME ");

type=6;

settime();

write(0,0);

delay(10);

write(1,temptime[1]);

delay(10);
write(2,temptime[0]);

delay(10);

for(add=4;add<7;add++)

write(add,temptime[add-1]);

delay(10);

dayselect=1;

// write(0x07,0x10);

delay(100);

timedisp:

/*

d22=0x15;

for(d11=0;d11<9;d11++)

h_break[d11]=read(d22++);

delay(100);

m_break[d11]=read(d22++);

delay(100);

//delay(300);

alarmcheck=read(0x20);

//

*/
lcdcmd(0x01);

msgdisplay("Dt:");

while(1)

lcdcmd(0x04);

for(add=0;add<7;add++)

time[add]=read(add);

z=time[add];

lcddata(B2+48);

lcddata(B1+48);

if(add<2)

lcddata(':');

if((add>3)&&(add<6))

lcddata('/');

delay(10);

if(pm1)

msgdisplay("pm");

else

msgdisplay("am");

if(dayselect==1)

lcdcmd(0x1);

msgdisplay("SELECT DAY: SUN");


while(enter==1)

lcdcmd(0x8d);

lcdcmd(0xe);

if(inc==0)

while(inc==0);

if(day<8)

day=day+1;

daydisplay(day);

if(dec==0)

while(dec==0);

if(day>1)

day=day-1;

daydisplay(day);

write(3,day);

while(enter==0);

dayselect=0;

lcdcmd(0x0c);

goto timedisp;

}
daydisplay(time[3]);

if(alarmcheck)

xy=time[2];

if(((xy==1)||(xy==3)||(xy==5))&&(time[0]<10))

bel=0;

lcdcmd(0x1);

msgdisplay("it is time for ");

lcdcmd(0xc0);

msgdisplay("medicines");

if(xy==1)

i=0x10;

if(xy==3)

i=0x20;

if(xy==5)

i=0x30;

j=0;

do
{

mem1[j]=read(i);

i++;

j++;

while(mem1[j-1]!=13);

mem1[j]='\0';

lcdcmd(0x1);

msgdisplay(mem1);

while(alarm_sw);

bel=1;

lcdcmd(0x1);

msgdisplay("thank you!!!");

delay(100);

goto timedisp;

//lcdcmd(0xcf);

//lcddata(' ');

if(alarm_sw==0)

while(alarm_sw==0);

lcdcmd(1);

msgdisplay("ENTER MEDICINES");

send_to_serial(" WELCOME ");


send_to_serial("ENTER MEDICENS TO BE TAKEN IN THE MORNING:\r\n ");

i=0;

do

while(RI==0);

ch=SBUF;

RI=0;

msg[i++]=ch;

while(ch!=13);

send_to_serial("\r\n STORING DATA:\r\n ");

for(i=0;msg[i]!=13;i++)

write(mem++,msg[i]);

delay(200);

write(mem,13);

delay(500);

//

j=0;

i=0x10;

do

mem1[j]=read(i);

i++;
j++;

}while(mem1[j-1]!=13);

mem1[j]='\0';

lcdcmd(0x1);

msgdisplay(mem1);

//

send_to_serial("ENTER MEDICENS TO BE TAKEN IN THE AFTERNOON:\r\n ");

i=0;

do

while(RI==0);

ch=SBUF;

RI=0;

msg[i++]=ch;

while(ch!=13);

send_to_serial("\r\n STORING DATA:\r\n ");

mem=0x20;

for(i=0;msg[i]!=13;i++)

write(mem++,msg[i]);

delay(200);

write(mem,13);

send_to_serial("ENTER MEDICENS TO BE TAKEN IN THE NIGHT:\r\n ");


i=0;

do

while(RI==0);

ch=SBUF;

RI=0;

msg[i++]=ch;

while(ch!=13);

send_to_serial("\r\n STORING DATA:\r\n ");

mem=0x30;

for(i=0;msg[i]!=13;i++)

write(mem++,msg[i]);

delay(200);

write(mem,msg[i]);

send_to_serial("THANK YOU....GET WELL SOON:\r\n ");

bel=1;

alarmcheck=1;

j=0;

i=0x30;

do

mem1[j]=read(i);
i++;

j++;

}while(mem1[j-1]!=13);

mem1[j]='\0';

lcdcmd(0x1);

msgdisplay(mem1);

delay(1000);

goto timedisp;

if(enter==0)

lcdcmd(0x01);

msgdisplay("SET THE TIME ");

while(enter==0);

goto start;

void settime(void)

unsigned char keycount=0,h,g,cmd,uplimit;

lcdcmd(0xC0);

if(type==6)

msgdisplay("hh:mmAM dd/mm/yr");

while(enter==1)
{

lcdcmd(cmd);

while((inc==1)&&(dec==1)&&(enter==1));

if(inc==0)

delay(30);

while(inc==0);

if(h==uplimit)

h=0;

h=h+1;

if(dec==0)

delay(30);

while(dec==0);

if(h)

h=h-1;

else

h=uplimit;

if(keycount==2)

if(h)

msgdisplay("pm");
pm=1;

else

msgdisplay("am");

pm=0;

else

g=h;

d11=g/10;

d22=g%10;

lcddata(d11+48);

lcddata(d22+48);

temptime[keycount]=g;

keycount=keycount+1;

delay(30);

while(enter==0);

void write(unsigned char add,unsigned char dat)

{
start();

ptos(0Xd0); //device addr in write mode//

ptos(add); //byte addr//

ptos(dat); //data//

stop();

//%%%%%%%%%%%%%%%%%%%% READING FUNCTION


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%

unsigned char read(unsigned char add)

{unsigned char v,i;

start();

ptos(0Xd0); //device addr in write mode//

ptos(add); //byte addr//

_nop_();

start();

ptos(0Xd1); //device addr in read mode//

SDA=1;

for(i=0;i<=7;i++)

SCL=0;

_nop_();

_nop_();

SCL=1;

v=v|SDA;

if(i<=6)
v=v<<1;

return(v);

// ####################################### DATA READING FUNCTION


###################################

void daydisplay(unsigned char day)

if(day==1)

msgdisplay("SUN");

else

if(day==2)

msgdisplay("MON");

else

if(day==3)

msgdisplay("TUE");

else

if(day==4)

msgdisplay("WED");

else

if(day==5)

msgdisplay("THU");

else

if(day==6)

msgdisplay("FRI");

else
if(day==7)

msgdisplay("SAT");

else;

//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ START FUNCTION


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

void start(void)

{ SCL=1;

SDA=1;

_nop_();

_nop_();

SDA=0;

SCL=0;

//aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa DATA SENDING TO EEPRAM IN READ MODE


AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

void ptos(unsigned char a)

unsigned char i,c;

for(i=0;i<=8;i++)

{ c=a&128;

if(c==0)

SDA=0;

else

SDA=1;

SCL=1;
_nop_();

_nop_();

SCL=0;

a=a<<1;

//SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS STOP FUNCTION


SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

void stop(void)

{ SDA=0;

SCL=1;

_nop_();

_nop_();

SDA=1;

SCL=0;

// VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV DELAY FUNCTION


VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

/* void delay(unsigned int s)

unsigned int i,j;

for(i=0;i<=s;i++)

for(j=0;j<=250;j++);

*/

void delay1(unsigned int itime)


{unsigned int i,j;

for(i=0;i<itime;i++)

for(j=0;j<3;j++);

/*

// HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH LCD COMMAND FUNCTION


HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

void lcdcmd(unsigned char value)

unsigned char n;

n=value;

value=value&(0x0f);

ldata = value;

rs =0;

en =1;

en =0;

value=n;

value=value<<4;

value=value &(0x0f);

ldata = value;

rs =0;

en =1;

en =0;

//**********************DEFINTIION OF LCD DATA IN FOUR BIT MODE


****************************
void lcddata(unsigned char value)

unsigned char n;

n=value;

value=value&(0x0f);

ldata = value;

rs =1;

en =1;

en =0;

value=n;

value=value<<4;

value=value &(0x0f);

ldata = value;

rs =1;

en =1;

en =0;

void msgdisplay(unsigned char b[])

for(i=0;b[i]!='\0';i++)

lcddata(b[i]);

}} */
CHAPTER-7

APPLICATIONS

Health maintenance organizations, medical researchers and health practitioners realize that in
an environment that rewards short-term cost savings and emphasizes management of current
diseases, increased use of patient reminders can significantly improve delivery of preventive care
services and treatment for chronic illnesses and can lead to long-term beneficial outcomes as well

The applications of patient medince reminder system is been initiated in a wide range in the
modern health care field. Its been implanted in most of the hospitals to ease the effort of the patient
entourage. It is as well a second-hand for the aged and memory loss group.

It is well known that patients who are prescribed medications, or who take over the counter
(OTC) medications, should take such medications at pre-determined dosage time intervals as
prescribed by the doctor or as indicated on the OTC medication package. Many drugs and
medications currently prescribed by physicians must be taken at prescribed time intervals. If the
patient ignores such instructions, for example, by taking the prescribed medication too often or too
seldom, this may result in serious adverse effects such as overdose risks or reduction in the
concentration of medication in the body. Many patients miss dosages because they are distracted or
forget about their medications at the correct dosage time. This is particularly true of elderly patients
who may be taking more than one medication at different time intervals. Although patients may set
an alarm clock or the like at a prescribed medication time interval, they may set the incorrect time
interval or may forget to re-set the alarm after taking a medication dose, and may also be away from
the alarm and not hear it when it goes off.

When required to take medicine on a daily or hourly schedule, many people have a problem
in recalling the time when the medicine was last taken. Similarly, many patients are unable to
remember or determine the previous dosage of medication taken or whether it has been taken at all.
This problem is particularly common among elderly patients, who may experience short-term
memory loss or, because of their infirmities, confuse the dosage previously taken of each medication.
Patients may also be unable to accurately read the medication containers themselves, and often have
no means to determine whether they have taken the mandated doses at the prescribed time intervals.
CHAPTER-8

CONCLUSION

The report contains a very different mix of studies varying from software to hardware. Vast
research is being done in the field of healthcare and patient medicine monitoring. This project has
given a basic insight into the bridging of technology and medicine. Patient medicine reminder
system is a “Cueing Support System for Evidence-Based Medicine practice.”
CHAPTER-9

REFERENCES
o www.wikipedia.com
o http://www.faqs.org/patents/app/20090040874
o ^ "Senior Care and Safety Check". Garland County Sheriff's Department.
http://www.garlandcountysheriff.com/programs/seniorcare.html. Retrieved 2007-12-16.
o ^ Fairfield County Sheriff's Office CARE! (Call Reassurance Program)
o Celler, Branko, Nigel Lovell, and Daniel Chan. “The Potential Impact of Home Telecare
of Clinical Practice”. The Medical Journal of Australia. 1999: 518-521.

You might also like