thannara123
Advanced Member level 5
ADC is working output is shown in bar LED . and the data is given to the Port - P1.
And again the Port 1 vaule is given to the Port 3 ( just for testing )
nothing showing ..
please help me ?
View attachment hh.bmp
And again the Port 1 vaule is given to the Port 3 ( just for testing )
nothing showing ..
please help me ?
Code:
#include <REGX51.H>
#include "lcd.h"
#include "adc.h"
void main(){ unsigned char a = 0;
P2 =0x00;
P0 =0x00;
P1 = 0xff;
P3 = 0x00;
lcd_init();
lcd_cmd(0x80);
lcd_data(54); // just send "1" to lcd to display ;
string("t");
lcd_cmd(0xc0);
conv(); //Start conversion
read(); //Read ADC
P3 = P1;
lcd_data(a);
while(1);
}
Proteus file attached .
Attachments
Last edited: