Connect gp2d12 infrared sensor with pic 16f877a

Status
Not open for further replies.

Alex Ng

New Member
I am new in using gp2d12 infrared sensor to connect with pic 16f877a. I cannot got the circuit how to connect gp2d12 infrared sensor to pic18f877a. Can anyone help me with this?
 
here is datasheet for gp2d12 infrared sensor.
 

Attachments

  • datasheet gp2d12.pdf
    64.1 KB · Views: 677
by now you should have plenty of information on how to interface (you would have had it sooner had you searched).

one thing that I have learned is that you need to mount the sensor away from the floor. I had a minisumo bot and mounted a GP2 about 2 inches from the bottom. I got significant floor scatter - this appeared to be noise at first (4-5 LSBs worth). Moving it higher resulted in a significant reduction in the noise level. still, it was pretty noisy - 2-3 LSBs. I used a simple FIR to get the noise down to around 1.5 LSBs which was good enough for a minisumo.
 
thank a lot to everyone. One more thing, how i set the command (assembly language or basic laguage) ito program the pic18f877a to receive the input of gp2d12 infrared sensor? Give me the example if possible.
 
Alex Ng said:
thank a lot to everyone. One more thing, how i set the command (assembly language or basic laguage) ito program the pic18f877a to receive the input of gp2d12 infrared sensor? Give me the example if possible.

I'm presuming that's the senosr with the analogue voltage output?, in which case you simply connect them to the analogue inputs of the 877 - my tutorials show and explain how to do it.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…