/*
	AI1.C

	Read the analog input on the PK23xx.

	This example simply reads and displays the resistive measurement input
	continuously.

	Set jumpers H4 1-3 and H4 5-6, then attach the resistive device between
	pins F08 and F09.
*/

#use eziopk23.lib		//	pk2300 specific defns

main() {

   eioBrdInit(0);		//	initialize general I/O
   _eioSetupAI1st();	//	initialize Resistive Measurement Input

   while (1) {				//	do this forever
      printf("reading %f\n",eioBrdAI(16));	//	read raw channel
      hitwd();			//	hit the watchdog
   }
}
