We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi I have connect an ADC0804 to an AT89c52 to port P1 and the RD,WR, INT to P2. and the output is display on digtial trainner but If I increase the IN voltage to the ADC the display is not changing. The following is the code i am using Keil can any tell what is the problem #include<reg51.h> xdata unsigned char var _at_ 0x9000; void display(); void adc(); main() { P1=0xFF; while(1) { adc(); } } void adc() { P2=0x00; P2=0x40; if(P2==0x80) { P2=0x00; var=P1; display(); P2=0x20; } } void display() { #pragma asm push dph push dpl push acc push b mov dptr,#9000h movx a,@dptr mov 60h,a lcall 019bh pop b pop acc pop dpl pop dph #pragma endasm }