How to test the GP2D12 and GP2D15 using PIC16F690?

hi,
i decided to use program using C language and compile using MPLAB, HI-TECH PICC.

i need to write a program in C for obstacle detection capabilities.
i m using a infrared sensors - GP2D15 and GP2D12 to detect obstacles.
i know how the GP2D15and GP2D12 works.

how to write the program to test the digital and analog infrared i have?