Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a PIC 1 6 F 8 8 7 based intelligent wrist band which measures the temperature and the SPO 2 level ( blood oxygen

Design a PIC 16F887 based intelligent wrist band which measures the temperature and the SPO2 level (blood oxygen level) of a patient. The intellgent band is connected to a PC via the serial port and they communicate via the UART in asynchronous mode.
Body temperature of the patient is measured using an LM35(10 mV/degC) connected to the AN0 pin. Assume that a reference voltage of 0.5V is used in the ADC module of the microcontroller.
It is assumed that the SPO2 sensor module produces an analog output which is proportional to the SPO2 value such that the maximum output voltage of the module is 0.5V when the SPO2 value is 100%. The output of the SPO2 sensor module is connected to the AN1 input
PIC sends the values of the temperature, heart rate and SPO2 values to the PC via the USART serial port in the asynchronous serial communication mode, at a baud rate of 9600 bits/s.
If the temperature of the patient is greater than 40degC or the SPO2 value is less than 80%, an SOS message is sent to the PC via the USART module and also an alarm is generated via a buzzer which is connected to the RD0 pin via a BC237 transistor.
a) Draw the circuit diagram of the system by using the component models given in the Appendix. Indicate the connections and the components clearly
b) Write a MicroC program to perform the above functions. Write your comments for each instruction, to explain its function and parameters clearly.
unsigned int temp, spo2;
char temp_str[8], spo2_str[8];
void main 0
{
ANSEL =003;
ANSELH =000;
UART1_init(9600);
while(1)
{
temp = ADC ?Read(0);
temp =(long) temp100/1023;
// ALARM
if(spo 280|| temp >40)
{
RDO_bit =1;
delay_ms (500);
RD0_bit =0;
}
else RDO_bit =0;
Int ToStr(temp, temp_str);
IntToStr(spo2, spo2_str);
UART1_Write_Text(" Temperature : ");
UART1_Write_Text(temp_str);
UART1_Write_Text("|r");
UART1_Write_Text(" Oxygen Level (%): ");
UART1_Write_Text(spo2_str);
UART1_Write_Text("(r'');
delay_ms (1000); }}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions

Question

=+c) Why did the researcher remove the Rent Index from the model?

Answered: 1 week ago

Question

Define indirect financial compensation (employee benefits).

Answered: 1 week ago