sam1121
Newbie level 1
- Joined
- Apr 15, 2014
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 9
Please Help PRESSURE SENSOR(MPX4115/4250) interfacing to 8051/ADC0804
Please give me with the formula to interface pressure sensor to ADC0804. I have code for temperature sensor(LM35). How can i modify it for pressure. The code is given below:
#define temp P0
sbit r= P3^3; // Write pin.
sbit d= P3^2; // Read pin.
void tempr() // Function for temperature measurement
{
while(1)
{
d=1;
r=0;
delay(1);
r=1;
delay(1);
d=0;
delay(1);
lcdcmd (0x38); //LCD command function
lcdcmd (0x0C);
lcdcmd (0x82);
lcd_astring("TEMPERATURE");
lcdcmd(0xc5);
c=temp/100;
lcddata1(c);
delay (1);
a=(temp/10)-(c*10);
lcddata1(a);
delay (1);
b=temp%10;
lcddata1(b);
delay (1);
lcdcmd(0xc9);
lcd_astring("C");
}
}
Please give me with the formula to interface pressure sensor to ADC0804. I have code for temperature sensor(LM35). How can i modify it for pressure. The code is given below:
#define temp P0
sbit r= P3^3; // Write pin.
sbit d= P3^2; // Read pin.
void tempr() // Function for temperature measurement
{
while(1)
{
d=1;
r=0;
delay(1);
r=1;
delay(1);
d=0;
delay(1);
lcdcmd (0x38); //LCD command function
lcdcmd (0x0C);
lcdcmd (0x82);
lcd_astring("TEMPERATURE");
lcdcmd(0xc5);
c=temp/100;
lcddata1(c);
delay (1);
a=(temp/10)-(c*10);
lcddata1(a);
delay (1);
b=temp%10;
lcddata1(b);
delay (1);
lcdcmd(0xc9);
lcd_astring("C");
}
}