/***********************************************************/
/*     DIO-24   : DEMO _01 Program                        */
/*     Function  : Basic Digital input / Output            */
/*     Langurage : Turbo C
/***********************************************************/

#include "stdio.h"
#include "conio.h"
#include "dio24.h"


main()
{


int i;

clrscr();

printf(" DIO-24 Digital Input / Output Demo Program \n");

      /* init DIO24 & get I/O address */

if(_DIO24_Init(0x2c0))
      {
	 printf(" Can't Found DIO-24 \n");
	 exit();
       }
else
      {
      printf(" DIO-24 I/O Address = %X \n",0x2C0 );

      }
			       /* Configuration I/O port  */

  _DIO24_Conf(0,0,0,0);     /* Set each port Output Mode */


for (i=0;i<=255; i++)
{                                      /*  Output Port A,B,C DATA */

  _DIO24_Output(Port_A,i);
  _DIO24_Output(Port_B,i);
  _DIO24_Output(Port_C,i);





  gotoxy(1,5);

  printf("CN0 Port A,B,C Output Data %X \n",i);

  if(getch()=='q') exit();
}

}

