Microcontroller › 8051 › interfacing ir sensor with 8051 › hi every one i have
hi every one i have question
i am using IR led As transmitter and photo transistor as reciever
whein IR is falling on phototransistor nothing is happen (which i actually want)
but when some one passes (break the LED light from IR on to Phototransistor)
i have
IR —> phototransistor—-> 2n2222 —-> an indicatng LED at its collector —-> which is then send to LM339 -ve (inverting) terminal—-> then +ve terminal of :LM339 is then fed (with pull up) to P1^0;
but problem comes over here…
initially the LM 339 output is generating 0V (but with my DMM it is actually showing 1.76V)
then when some one passes LM339 generates 5V (buti with my DMM it is 5.56V)
problem is controller starts incrementing automatically
where i want is that when some pass then controller increment by one
and so on till 99
PLEASE HELP TO PUT DATA FROM LM339 OUTPUT TO P1^0 TO PERFOM FUNCTION
NEED URGENT HELP
REGARDS