#use eziolp31.lib

#define INPUTCHAN 0

main() {
	float raw, analog;
	
	eioBrdInit(0);						//	initialize the I/O driver
	eioBrdDO(nADENA,0);				//	enable analog input circuitry
	raw = eioBrdAI(INPUTCHAN+16);	//	read the raw channel
	eioErrorCode = 0;					//	clear error flag
	analog = eioBrdAI(INPUTCHAN);	//	read the analog channel
	if (eioErrorCode & EIO_NODEV) {
		printf("analog input channel %d doesn't exist!\n",INPUTCHAN);
	} else {
		printf("analog input channel %d reads 0x%04x, interpreted to %f\n",
			INPUTCHAN, (int)raw, analog);
	}
}