Hi,
I would recommend that you tie the square wave input to the INT pin and set the AD conversion bit as soon as an interrupt occurs. Also set a software flag so that your program knows that a new sample is available. You can call this routine or just poll the software flag to update your results. However you should also introduce some delay before setting the ADON bit to ensure proper acquisition.
Regards
Sougata
Bookmarks