Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/07/03 10:22
Read: times


 
#54259 - RE: Problem in Reading the O/P of an ADC
Responding to: ???'s previous message
P2=0x40;
if(P2==0x80)


It seems you are confused about port I/O. With the code above, P2 can never equal 0x80! Check the "Links" <--- for the 8051 'bible'. It explains the workin of the I/O pins in great detail.

Also, you will make life a lot easier for yourself if you declare the individual port pins that control the ADC's RD, WR and INT pins as sbit variables. It will make your code more efficient and much easier to read.


Hope this helps.

Best regards,
Rob Klein.

List of 4 messages in thread
TopicAuthorDate
Problem in Reading the O/P of an ADC0804            01/01/70 00:00      
   RE: Problem in Reading the O/P of an ADC0804            01/01/70 00:00      
   RE: Problem in Reading the O/P of an ADC            01/01/70 00:00      
   RE: Problem in Reading the O/P of an ADC0804            01/01/70 00:00      

Back to Subject List