/*
	DIO1.C

	PK2300
	
	Read digital input IN-01 and echo its state to OUT-01.

	Attach a voltmeter to OUT-01, then ground IN-01. OUT-01 will change state
	according to the state of IN-01.
*/

#use eziopk23.lib		//	pk2300 specific defns
#define IN_CHAN 0		//	define input channel pin PI-01
#define OUT_CHAN 0	//	define output channel pin HC-01

int DIN;

main() {
   eioBrdInit(0);
   while (1) {			//	do this indefinitely
      eioBrdDO(OUT_CHAN,eioBrdDI(IN_CHAN));
      hitwd();			//	hit watchdog
   }
}
