
AX5426P 32CH Opto-isolated - D/I & D//O User’s Manual
Examples
%2
&'"
1"! 23
**************************************************************************************
*
Example program for turbo C language
*
*
To get BASE ADDRESS
*
* IRQ
LEVEL *
*
SLOT NUMBER via device driver
*
*
Before executing this program, device driver
*
*
must be installed successfully.
*
**************************************************************************************
#include <dos.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <fcntl.h>
#include <io.h>
main()
{int fd;
int base,slotno,irqno;
unsigned int i,j,dat;
if((fd=open("5426DRV",O_RDWR))==-1)
{
printf("5426 open fail! \n");
exit(0);
}
else
printf("ok\n");
write(fd,"B1",2);
read(fd,&base,sizeof(int));
write(fd,"I1",2);
read(fd,&irqno,sizeof(int));
write(fd,"S1",2);
read(fd,&slotno,sizeof(int));
close(fd);
printf("BASE ADDRESS: %x\n",base);
printf("IRQ LEVEL: %x\n",irqno);
printf("SLOT NUMBER: %x\n",slotno);
Summary of Contents for AC5426P
Page 1: ... ...
Page 2: ... ...
Page 6: ... Table of Contents 0 1 2 1 2 32 ...
Page 10: ...AX5426P 32CH Opto isolated D I D O User s Manual ...
Page 11: ...AX5426P 32CH Opto isolated D I D O User s Manual Board Configuration and Installation ...
Page 12: ...AX5426P 32CH Opto isolated D I D O User s Manual Board Configuration and Installation JP2 JP1 ...
Page 18: ...AX5426P 32CH Opto isolated D I D O User s Manual Board Configuration and Installation 1 0 1 ...
Page 25: ...IO3 IO4 Opto isolated D I Relay Actuator User s Manual Register Format and Description 1A 1 ...
Page 26: ......
Page 30: ...AX5426P 32CH Opto isolated D I D O User s Manual ...
Page 34: ...AX5426P 32CH Opto isolated D I D O User s Manual Examples ...
Page 35: ...AX5426P 32CH Opto isolated D I D O User s Manual Block Diagram ...
Page 36: ...AX5426P 32CH Opto isolated D I D O User s Manual ...