PDA

View Full Version : Need Help with GP2Y0A21 IR Sensor



azmax100
- 25th January 2009, 03:47
Hi all,
I am in doing a robotic project. I have experience connecting GP2Y0A21 IR sensor with basic stamp 2 using ADC 0831. I want to use this sensor with 16F628 and use the internal ADC.

I need a sample code in PBP and how to implement it.

Please help.

Thanks.

eggman
- 25th January 2009, 11:51
The PIC16F628 does not have an internal ADC. Use a PIC16F88 instead.
In the PBP manual you can find out about the ADCIN command, is not too difficult, something like : ADCIN 0,range