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.