desmond
Member level 1
hi all
i am a beginner, if something wrong, plx teach me ......thx !!!
i would like to know how does the adc0804 transfer the virable data to the 80s51 and display the variable data onto the LCD in C language . which i connect the LM35d at 6 pin of adc0804.........thx
besides, what is the problem of that program
#include<REGX51.H>
#include"lcd.h"
#define adc_in P0
#define adc_rd P2_0
#define adc_wr P2_1
#define enable P3_3
mian(viod)
{
init_lcd();
clear_lcd();
display_LCD_string("test");
gotoxy(2,1);
display_LCD_number(volt);
while(1);
}
void display_LCD_number;
{ adc_wr=0; start adc0804
adc_wr=1; end adc0804
adc_rd=0; start read adc0804
volt=adc_in; read adc0804's data
volt=volt<<1; the voltage of data X2
adc_rd=1; end read
}
i am a beginner, if something wrong, plx teach me ......thx !!!
i would like to know how does the adc0804 transfer the virable data to the 80s51 and display the variable data onto the LCD in C language . which i connect the LM35d at 6 pin of adc0804.........thx
besides, what is the problem of that program
#include<REGX51.H>
#include"lcd.h"
#define adc_in P0
#define adc_rd P2_0
#define adc_wr P2_1
#define enable P3_3
mian(viod)
{
init_lcd();
clear_lcd();
display_LCD_string("test");
gotoxy(2,1);
display_LCD_number(volt);
while(1);
}
void display_LCD_number;
{ adc_wr=0; start adc0804
adc_wr=1; end adc0804
adc_rd=0; start read adc0804
volt=adc_in; read adc0804's data
volt=volt<<1; the voltage of data X2
adc_rd=1; end read
}