Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
i dont know who you are but you saved generations with this video. many thanks
Which time is displayed on lcd , its different from the real temperature right can u plz explain
#include#define dataport P2#define adc_input P0sbit rs = P3^0;sbit rw = P3^1;sbit e = P3^2;sbit wr= P3^3;sbit rd= P3^4;sbit intr= P3^5;void delay(unsigned int);void lcd_cmd(unsigned char);void lcd_data(unsigned char);void lcd_data_string(unsigned char*);void lcd_init();void adc_conv();void adc_read();void lcd_data_adc(unsigned int);int num[10];void main(){while(1){dataport=0x00;adc_input=0xff;P3=0x00;lcd_init();lcd_data_string("TEMPERATURE : ");adc_conv();adc_read();lcd_data('C');delay(50);}}void lcd_init(){lcd_cmd(0x01);delay(1);lcd_cmd(0x06);delay(1);lcd_cmd(0x0e);delay(1);lcd_cmd(0x38);delay(1);lcd_cmd(0x80);delay(1);}void delay(unsigned int sec ){int i ,j ;for(i=0;i=0;p--){dataport=num[p]+48;rw = 0;rs = 1;e = 1;delay(1);e = 0;}}void lcd_data_string(char *x){while(*x!='\0'){lcd_data(*x);delay(2);x++;}}
Give me this code
i dont know who you are but you saved generations with this video. many thanks
Which time is displayed on lcd , its different from the real temperature right can u plz explain
#include
#define dataport P2
#define adc_input P0
sbit rs = P3^0;
sbit rw = P3^1;
sbit e = P3^2;
sbit wr= P3^3;
sbit rd= P3^4;
sbit intr= P3^5;
void delay(unsigned int);
void lcd_cmd(unsigned char);
void lcd_data(unsigned char);
void lcd_data_string(unsigned char*);
void lcd_init();
void adc_conv();
void adc_read();
void lcd_data_adc(unsigned int);
int num[10];
void main()
{
while(1)
{
dataport=0x00;
adc_input=0xff;
P3=0x00;
lcd_init();
lcd_data_string("TEMPERATURE : ");
adc_conv();
adc_read();
lcd_data('C');
delay(50);
}
}
void lcd_init()
{
lcd_cmd(0x01);
delay(1);
lcd_cmd(0x06);
delay(1);
lcd_cmd(0x0e);
delay(1);
lcd_cmd(0x38);
delay(1);
lcd_cmd(0x80);
delay(1);
}
void delay(unsigned int sec )
{
int i ,j ;
for(i=0;i=0;p--)
{
dataport=num[p]+48;
rw = 0;
rs = 1;
e = 1;
delay(1);
e = 0;
}
}
void lcd_data_string(char *x)
{
while(*x!='\0')
{
lcd_data(*x);
delay(2);
x++;
}
}
Give me this code