desmond
Member level 1
Hi all
I am doing a project with using 89s51, adc0804, lm 358(amplifier) and a force sensing resistor.
my question is i dun know how to program it in order to generate a accuracy value get from the force acting on the force sensing resistor.
In my circuit, I use 500 ohm resistor to connect with lm358.
by the way......i would like to ask, is it the same value to my output of lm358 (amplifier) and the output value display on LCD ??? because i do it to verify my program ? but am i right ???
void display_LCD_number(unsigned char number)
{
unsigned char x,y,i=2;
int z;
z=(int) number;
z=z<<1;
x=z/500;
y=z-x*10;
gotoxy(2,3);
write_LCD_data(int2char[y]);
gotoxy(2,1);
display_LCD_string(".");
z=x;
x=z/500;
y=z-x*10;
gotoxy(2,2);
write_LCD_data(int2char[y]);
z=x;
x=z/500;
y=z-x*10;
gotoxy(2,0);
write_LCD_data(int2char[y]);
z=x;
x=z/500;
y=z-x*10;
gotoxy(2,4);
write_LCD_data(int2char[y]);
gotoxy(2,5);
display_LCD_string("V");
}
thx a lot
I am doing a project with using 89s51, adc0804, lm 358(amplifier) and a force sensing resistor.
my question is i dun know how to program it in order to generate a accuracy value get from the force acting on the force sensing resistor.
In my circuit, I use 500 ohm resistor to connect with lm358.
by the way......i would like to ask, is it the same value to my output of lm358 (amplifier) and the output value display on LCD ??? because i do it to verify my program ? but am i right ???
void display_LCD_number(unsigned char number)
{
unsigned char x,y,i=2;
int z;
z=(int) number;
z=z<<1;
x=z/500;
y=z-x*10;
gotoxy(2,3);
write_LCD_data(int2char[y]);
gotoxy(2,1);
display_LCD_string(".");
z=x;
x=z/500;
y=z-x*10;
gotoxy(2,2);
write_LCD_data(int2char[y]);
z=x;
x=z/500;
y=z-x*10;
gotoxy(2,0);
write_LCD_data(int2char[y]);
z=x;
x=z/500;
y=z-x*10;
gotoxy(2,4);
write_LCD_data(int2char[y]);
gotoxy(2,5);
display_LCD_string("V");
}
thx a lot