COM(PCI/C-PCI)Linux/RT GPH Asynchronous Serial Comunications Driver Software for Linux/RTLinux. Help for Linux.

Size: px
Start display at page:

Download "COM(PCI/C-PCI)Linux/RT GPH Asynchronous Serial Comunications Driver Software for Linux/RTLinux. Help for Linux."

Transcription

1 COM(PCI/C-PCI)Linux/RT GPH-4141 Asynchronous Serial Comunications Driver Software for Linux/RTLinux Help for Linux

2 -Contents- GPH-4141 Help for Linux Chapter 1 Introduction Overview Features...4 Chapter 2 Product Specifications Operating Environments Kernel Version Target Boards Functional Specifications...7 Chapter 3 Installation and Board Configuration Installing the Linux Driver Software Loading the Driver Modules Confirming the Device Node Programming Compiling the Program Running the Program Programming Guide (Asynchronous Serial Comminications) Initializing a Port Opening a Port with Specifying the Board Transmitting Data Receiving Data Half-Duplex Transmission Closing the Port Programming Guide (Digital Input/Output) Initializing a Port Input Output Retrieving Data Closing the Port Loading Driver Option The /proc File System Configuring the Device Numbers...22 Chapter 4 Reference (Asynchronous Serial Communications) List of Functions List of IOCTL Request Code Extended ioctl CP4141_SET_BAUDRATE CP4141_GET_BAUDRATE CP4141_SET_DUPLEX_MODE CP4141_GET_DUPLEX_MODE CP4141_SET_FIFO_TRIGGER CP4141_GET_FIFO_TRIGGER CP4141_SET_HS_FUNCTION CP4141_GET_HS_FUNCTION CP4141_GET_PORTINFO Structure fifo_trigger_level Structure CP4141_HSFUNC Structure CP4141_PORTINFO Structure

3 4.5 Monitor Mode RS-to-CS Connection RS-to-CD Connection How to Use the Monitor Mode Limitations...45 Chapter 5 Reference (Digital Input/Output) List of Functions SdioOpen SdioClose SdioInputPoint SdioOutputPoint SdioInputByte SdioInputWord SdioInputDword SdioOutputByte SdioOutputWord SdioOutputDword SdioSetLatchLogic SdioGetLatchLogic SdioInputLatchPoint SdioInputLatchByte SdioInputLatchWord SdioInputLatchDword SdioSetEvent SdioSetEventLogic SdioGetEventLogic SdioGetTmoduleStatus SdioSetTmodulePower CallBackProc Return Values Kylix Function Definitions Structure Definitions Example...71 Chapter 6 Sample Programs Trasmit Data Sample Program (Full-Duplex) Transmit Data Sample Program (Two-Wire Half-Duplex) Receive Data Sample Program (Full-Duplex) Receive Data Sample Program (Two-Wire Half-Duplex) Sample Programs for Kylix...74 Chapter 7 Important Information Limited Warranty Copyrights and Intellectual Property Rights Warning Regarding Medical and Clinical Use of Our Products Prohibition of Reproduction Limitation of Liability Trademark

4 Chapter 1 Introduction 1.1 Overview GPH-4141 Help for Linux The GPH-4141 software controls Interface asynchronous serial communications boards from your application running on Linux or RTLinux. Application software should control the asynchronous serial communications boards through the provided application programming interface (API). This document includes the information for using the GPH-4141 on Linux. 1.2 Features - Interface asynchronous serial communications boards can be used as same as a serial port in the computer. - The GPH-4141 is compliant with the TTY driver. Communication is achieved by using the Linux standard serial functions (termios). - Varied baud rate can be configured by calling appropriate ioctl functions. - The GPH-4141 supports two-wire half-duplex transmission and multi-drop network with an interface board which is compliant with RS-485. This software also supports four-wire half-duplex transmission. - The following products include a CPU, and the feature reduces their system load: PCI Q, CTP Q, CPZ Q, PCI Q, CTP Q, CPZ Q, PCI Q, CTP Q, CPZ Q, PCI Q, CTP Q, and CPZ Q. - The GPH-4141 controls up to 16 channels in the following products: PCI Q, CTP Q, CPZ Q, PCI Q, CTP Q, and CPZ Q. - The GPH-4141 controls up to 48 digital input/output channels in the following products: PCI Q, CTP Q, CPZ Q, PCI Q, CTP Q, and CPZ Q. 4

5 Chapter 2 Product Specifications 2.1 Operating Environments GPH-4141 Help for Linux The following table shows operating environments for the GPH Computers Interface industrial controllers PC/AT compatibles NEC PC/FC-9821 Driver Type TTY driver (Linux serial driver compatible) Loading Method Loadable module (dynamic loading/unloading) Device Node PCI-4201xxQ, PCI-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, CTP-4201xxQ, CTP-4202xxQ /dev/ttyg0 through /dev/ttyg127 /dev/cug0 through /dev/cug127 (Changeable at loading the driver module) Major Number PCI-4161, PCI-4661xx, LPC , LPC-4661xx, PEX , PEX-4661xx, CTP-4661xx, CPZ-4661xx, CBI-4641, CBI WA, CSI , CSI , CBI-4661xx, CSI , CSI , CBI Other than above PCI-4201xxQ, PCI-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, CTP-4201xxQ, CTP-4202xxQ PCI-4161, PCI-4661xx, LPC , LPC-4661xx, PEX , PEX-4661xx, CTP-4661xx, CPZ-4661xx, CBI-4641, CBI WA, CSI , CSI , CBI-4661xx, CSI , CSI , CBI /dev/ttyg0 through /dev/ttyg127 /dev/cug0 through /dev/cug127 (Changeable at loading the driver module) /dev/ttys64 through /dev/ttys191 /dev/cua64 through /dev/cua191 (Changeable at loading the driver module) Fixed assignment (default setting: 48, 49) (Changeable at loading the driver module) Fixed assignment (default setting: 40, 41) (Changeable at loading the driver module) Other than above Fixed assignment (default setting: 4, 5) (Changeable at loading the driver module) Source Code Open Policies Driver module: open Build Support Makefile provided Help File PDF format 2.2 Kernel Version - IBM PC/AT compatibles: kernel version 2.2.x, 2.4.x, 2.6.x (SMP supported) - Interface SH-4 CPU board: Interface SH-Linux The following models are compatible with only the kernel version 2.4.x and 2.6.x: PCI Q, PCI Q, PCI Q, PCI Q, LPC , LPC , LPC , LPC , LPC , PEX , PEX , PEX , PEX , PEX , CPZ Q, CPZ Q, CPZ Q, CPZ Q, CTP Q, CTP Q, CTP Q, CTP Q, CSI , CSI , CSI , CSI , CSI , and PCI

6 2.3 Target Boards - PCI expansion boards (PCI series) PCI-4141 PCI-4141P PCI-4141PE PCI-4142 PCI-4142P PCI-4142PE PCI-4144 PCI-4145 PCI-4146 PCI-4147 PCI-4148C PCI-4149C PCI-4150 (serial section) PCI-4155 PCI-4161 PCI-4646 PCI Q PCI Q PCI Q PCI Q PCI PCI P PCI PCI P PCI PCI A PCI P PCI PA PCI PCI A PCI P PCI PA PCI PCI PCI Low Profile PCI expansion boards (LPC series) LPC (serial section) LPC LPC LPC LPC PCI Express expansion boards (PEX series) PEX (serial section) PEX PEX PEX PEX CompactPCI expansion boards (CTP series) CTP-4141 CTP-4141P CTP-4142 CTP-4142P CTP-4144 CTP-4145 CTP-4146 CTP-4147 CTP-4148 CTP-4149 CTP CTP CTP Q CTP Q CTP Q CTP Q - CompactPCI expansion boards (CPZ series) CPZ-4141 CPZ-4141P CPZ-4142 CPZ-4142P CPZ-4144 CPZ-4145 CPZ-4146 CPZ-4147 CPZ-4148 CPZ-4149 CPZ Q CPZ Q CPZ Q CPZ Q CPZ CPZ P CPZ CPZ P CPZ CPZ A CPZ P CPZ PA CPZ CPZ A CPZ P CPZ PA CPZ CPZ CardBus card (CBI series) CBI-4641 CBI WA - CardBus card (CSI series) CSI (serial section) CSI CSI CSI CSI CSI

7 2.4 Functional Specifications Function Number of ports Transfer PCI-4161,CBI-4641, CBI WA Rate PCI-46610x, PCI-4202xxQ, PEX-46610x, LPC-46610x, CPZ-46610x, CPZ-4202xxQ, CTP-4202xxQ,CTP-46610x, CSI , CSI , CSI PCI-4661x0, PCI-4201xxQ, PEX , PEX-4661x0, LPC , LPC-4661x0, CPZ-4661x0, CPZ-4201xxQ, CTP-4201xxQ,CTP-4661x0, CSI , CSI , CSI Other than above Data length Parity Stop bit length Communication mode Control signal /proc file system Digital input/output PCI-4161, PCI-4661xx, PCI-4201xxQ, PCI-4202xxQ, PEX , PEX-4661xx, LPC , LPC-4661xx, CPZ-4661xx, CPZ-4201xxQ, CPZ-4202xxQ, CTP-4201xxQ, CTP-4202xxQ, CTP-4661xx, CBI-4641, CBI WA, CSI , CSI , CSI , CSI , CSI , CSI Other than above RS-232C Description/Specification 128 ports (max.) 12 bps to 1 Mbps 8 bps to 2 Mbps 8 bps to 1 Mbps 2 bps to kbps 5 bits through 8 bits None, odd number, even number 1 bit, 2 bits 1 bit, 1.5 bits, 2 bits Full-duplex transmission, four-wire half-duplex transmission RS-485 Full-duplex transmission, two-wire half-duplex transmission, four-wire half-duplex transmission RS-232C Output: RS, ER Input: CS, DR, CI, CD RS-485 Output: C * Input: I * PCI-4201xxQ, PCI-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, CTP-4201xxQ, CTP-4202xxQ Note: * These signals are applicable only to full-duplex transmission. Applicable to: - Device node name - Number of bytes of data that have been transmitted or received - State of the control signals 24 channels per device 7

8 Chapter 3 Installation and Board Configuration 3.1 Installing the Linux Driver Software 1. Run the installer. #sh install 2. Install Linux. Refer to Readme.txt file for details. 3. Follow further instructions displayed on the screen. 3.2 Loading the Driver Modules GPH-4141 Help for Linux Load the GPH-4141 driver modules. The driver is dependent on the board. Refer to the following table. Board Driver PCI-4201xxQ, PCI-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, CTP-4201xxQ, cp4201 CTP-4202xxQ PCI-4161, PCI-4661xx, LPC , LPC-4661xx, PEX , PEX-4661xx, cp4161 CTP-4661xx, CPZ-4661xx, CBI-4641, CBI WA, CSI , CSI *, CSI-4661xx, CSI , CSI , CSI Other than above cp4141 Note: To use DIO function in the CSI , cpsdionu need to be loaded. <Example> CSI #modprobe cp4161 #modprobe cpsdionu <Example> PCI Q #modprobe cp Confirming the Device Node To confirm the device node name of each communication port, use the /proc file system. To open a communication port, the device node name must be specified. #cat /proc/tty/driver/cp4141 ttys64: PCI-4141(bid=0h)CH1 [9600bps] tx:0 rx:0 ttys65: PCI-4141(bid=0h)CH2 [9600bps] tx:0 rx:0 ttys66: PCI-4142(bid=0h)CH1 [9600bps HD2W] tx:0 rx:0 ttys67: PCI-4142(bid=0h)CH2 [9600bps HD2W] tx:0 rx:0 #cat /proc/tty/driver/cp4161 ttyg0: PCI-4161(bid=0h)CH1 [9600bps] tx:0 rx:0 ttyg1: PCI-4161(bid=0h)CH2 [9600bps] tx:0 rx:0 ttyg2: CBI-4641(bid=0h)(ID: ) CH1 [9600bps] tx:0 rx:0 ttyg3: CBI-4641(bid=0h)(ID: ) CH2 [9600bps] tx:0 rx:0 Note: The ttyxx above is the device node name. 8

9 3.4 Programming A sequence of communication port control; opening a port, configuring the baud rate, transmitting data, closing the port, is written here. These codes are for the port whose device node name is ttys64. After writing these codes, save this file named as comtest.c. If you use Kylix, refer to 5.3 Kylix. #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <termios.h> #include <errno.h> #include <sys/ioctl.h> #include cp4141.h int main(void) { int fd, ret; struct termios options; unsigned long BaudRate; fd = open( /dev/ttys64, O_RDWR O_NONBLOCK); if (fd < 0){ perror( The port is not found. ); return -1; } BaudRate = ; ret = ioctl( fd, CP4141_SET_BAUDRATE, &BaudRate); if(ret == -1) { perror( The baud rate configuration cannot be performed. ); close(fd); return -1; } ret = write(fd, 12345, 5); if(ret == -1) { perror( The transmission failed. ); close(fd); return -1; } } close(fd); return 0; 9

10 3.5 Compiling the Program Compile the program made in 3.4 Programming. Type the command as follows. #gcc o comtest comtest.c 3.6 Running the Program Run the program as follows. #./comtest Refer to 3.7 Programming Guide, for more details of how to program. 3.7 Programming Guide (Asynchronous Serial Comminications) The GPH-4141 uses the Linux standard serial functions to control a communication port Initializing a Port The open system call opens a port. The opened port must be closed by the close system call before the application is terminated. These codes are for the port whose device node name is ttys66. int open_port(void) { int fd; } /* Open a port. */ fd = open( /dev/ttys66, O_RDWR); if(fd < 0) { perror( The port is not found. ); } return fd; 10

11 3.7.2 Opening a Port with Specifying the Board The information of the port can be retrieved by calling the ioctl function with the CP4141_GET_PORTINFO code. These codes show that channel 1 on the PCI-4144 (RSW1: 0) is opened. int open_cp4141port(int DeviceID, int SubsystemID, int BoardID, int ChannelNumber) { int index; int tempfd; char ttyname[256]; CP4141_PORTINFO PortInfo; /* Searching the port from /dev/ttys64 in turn. */ for(index = 0; index < CP4141_MAX_PORTS; index++) { sprintf(ttyname, /dev/ CP4141_TTY_NAME %d, index + 64); tempfd = open(ttyname, O_RDWR O_NDELAY); if(tempfd < 0) continue; } if(ioctl(tempfd, CP4141_GET_PORTINFO, &PortInfo) < 0) { close(tempfd); return -1; } if (PortInfo.DeviceID == DeviceID && PortInfo.SubsystemID == SubsystemID && PortInfo.BoardID == BoardID && PortInfo.ChannelNumber == ChannelNumber) { return tempfd; } } return -1; int main(void) { int fd; } /* Open a port. */ fd = open_cp4141port(4144, 0x1, 0, 1); if(fd < 0) { perror( The port is not found. ); return -1; } 11

12 After opening a port, configure communication parameters. The tcgetattr function retrieves the current parameters and changes the parameters of the termios structure as required. The tcsetattr function configures the setting. These codes show the configuration by the tcsetattr function. int setup_port(int fd) { struct termios tty_config; /* Retrieve the current parameters. */ tcgetattr(fd, &tty_config); /* Configures communication parameters as follows. */ /* Data length: 8 bits, 1 stop bit */ /* No flow control, No local echo */ tty_config.c_cflag &= ~(CRTSCTS CSIZE); tty_config.c_cflag = (CS8 CLOCAL CREAD); tty_config.c_iflag &= ~(IXON IXOFF ICRNL ISTRIP); tty_config.c_oflag = 0; tty_config.c_lflag &= ~(ICANON ECHO); } if(tcsetattr(fd, TCSANOW, &tty_config) == -1) { perror( The port configuration cannot be performed. ); return -1; } return 0; >> Baud Rate Configuration without Using termios When you use the baud rate except the following rates, use appropriate code in the ioctl function for baud rate configuration. 50 bps 75 bps 110 bps 134 bps 150 bps 200 bps 300 bps 600 bps 1200 bps 1800 bps 2400 bps 4800 bps 9600 bps bps bps bps bps bps The following codes configure the baud rate to bps. int setup_port(int fd) { struct termios tty_config; unsigned long BaudRate; /* Communication Configuration (Not baud rate configuration) */ tcgetattr(fd, &tty_config); tty_config.c_cflag &= ~(CRTSCTS CSIZE); tty_config.c_cflag = (CS8 CLOCAL CREAD); tty_config.c_iflag &= ~(IXON IXOFF ICRNL ISTRIP); tty_config.c_oflag = 0; tty_config.c_lflag &= ~(ICANON ECHO); if(tcsetattr(fd, TCSANOW, &tty_config) == -1) { perror( The port configuration cannot be performed. ); return -1; } 12

13 } (Continued) /* Configure the baud rate to bps. */ BaudRate = ; if(ioctl(fd, CP4141_SET_BAUDRATE, &BaudRate) == -1) { perror( The baud rate configuration cannot be performed. ); return -1; } return 0; 3.8 Transmitting Data To transmit data, use the write function in termios. Example) void send_data(int fd) { char SendBuffer[256]; size_t SendLength; /* Set data to the SendBuffer. */ strcpy(sendbuffer, The quick brown fox jumps over the lazy dog. ); /* Retrieve the data length. */ SendLength = strlen(sendbuffer); } /* Transmit the data. */ write(fd, SendBuffer, SendLength); 3.9 Receiving Data To receive data, use the read function in termios. Example) #define MAX_RECEIVE_LENGTH 128 int receive_data(int fd) { int ret; char RecvBuffer[MAX_RECEIVE_LENGTH]; /* Reading the received data. */ ret = read(fd, RecvBuffer, MAX_RECEIVE_LENGTH); if(ret < 0) return ret; } /* Display the received data. */ if(ret > 0) { RecvBuffer[ret] = '/0'; printf("%s", RecvBuffer); } return ret; 13

14 3.10 Half-Duplex Transmission For half-duplex transmission, communication mode must be configured by calling the ioctl function with the CP4141_SET_DUPLEX_MODE code as follows. The example below is for configuring two-wire half-duplex transmission. int set_duplexmode(int fd) { int ret; unsigned long DuplexMode; } /* Configure to the two-wire half-duplex transmission. */ DuplexMode = CP4141_HALF_DUPLEX_2W; ret = ioctl(fd, CP4141_SET_DUPLEX_MODE, &DuplexMode); return ret; To change the data line of the cp4141 driver, call the ioctl function with the TIOCMBIS or TIOCMBIC code. To transmit data, enable the transmit data line and disable the receive data line by using the TIOCMBIS code. Then transmit the data. To receive data, enable the receive data line and disable the transmit data line by using the TIOCMBIC code after transmitting data. int half_send_data(int fd) { int ret; unsigned int flag; */ /* Enable the transmit data line and disable the receive data line. flag = TIOCM_RTS; ioctl(fd, TIOCMBIS, &flag); /* Transmit the data. */ ret = write(fd, 12345, 5); if(ret < 0) return ret; /* Wait until all data have been transmitted. */ while(1) { ioctl(fd, TIOCSERGETLSR, &flag); if(flag & TIOCSER_TEMT) { break; } } */ } /* Disable the transmit data line and enable the receive data line. flag = TIOCM_RTS; ioctl(fd, TIOCMBIC, &flag); return 0; 14

15 Note: Transmit data may be dropped if you change the data line at too early timing. To avoid this, do not change the data line until all data have been transmitted. You can confirm whether all data have been transmitted or not by the TIOCSER_TEMT bit of the TIOCSERGETLSR code. The write function return does not mean that all data have been transmitted. The data line of the cp4201 or cp4161 driver is switched automatically by hardware. Configure the switch timing by using the CP4141_SET_HS_FUNCTION request code Closing the Port Close the port by using the close function. The close function must be used for closing the port. int close_port(int fd) { int ret; } ret = close(fd); if(ret < 0) { perror("failed to close the port."); return ret; } return 0; 3.12 Programming Guide (Digital Input/Output) This section explains how to use the functions. Sample codes are written in C Initializing a Port Open the device and get a device handle. int ndevice = IFSDIO_DEVICENO_TTY_0_1; /* Initializ the Device. */ lret = SdioOpen(nDevice); if (lret!= IFSDIO_ERROR_SUCCESS) { * fails to open * return -1; } 15

16 Specify a unique device number defined by the model, channel, and RSW1 setting value (or CardBus ID) to the first argument. The following table shows the model, channel, RSW1 setting value, and the device number identifier. RSW1 Device Model Channel Device Nmber Identifier Stting Vlue number CSI IFSDIO_DEVICENO_TTY_0_ IFSDIO_DEVICENO_TTY_1_1 * The device numbers are not sequential numbers. F 1 31 IFSDIO_DEVICENO_TTY_F_1 CPZ Q, CPZ Q, CPZ Q, CPZ Q, CTP Q, CTP Q, CTP Q, CTP Q, PCI Q, PCI Q, PCI Q, PCI Q * The following products do not have Channel 2. CPZ Q, CPZ Q, CTP Q, CTP Q, PCI Q,PCI Q Input IFSDIO_DEVICENO_TTYQ_0_ IFSDIO_DEVICENO_TTYQ_0_ IFSDIO_DEVICENO_TTYQ_1_ IFSDIO_DEVICENO_TTYQ_1_ IFSDIO_DEVICENO_TTYQ_F_1 IFSDIO_DEVICENO_TTYQ_F_2 F 2 64 The device handle obtained by the SdioInputByte/SdioInputWord/SdioInputDword function reads the specified pin status. // Read the pin status of IN1 throuth IN8. lret = SdioInputByte( ndevice, IFSDIO_IN1_8, &Value ); // Read the pin status of IN1 throuth IN16. lret = SdioInputWord( ndevice, IFSDIO_IN1_16, &Value ); // Read the pin status of IN1 through IN32. lret = SdioInputDword( ndevice, IFSDIO_IN1_32, &Value ); The method above shows how to read the pin status every 8 pins, 16 pins, and 32 pins. The method below shows how to specify the input pin range. // Read the pin status of IN5, IN6 and IN7. lret = SdioInputPoint( ndevice, &nbuffer[0], 5, 3 ); nbuffer must have three or more factors. 16

17 Output The device handle obtained by the SdioOutputByte/SdioOutputWord/SdioOutputDword function writes the output status. // Writes to OUT1 through OUT8. lret = SdioOutputByte( ndevice, IFSDIO_OUT1_8, Value ); // Writes to OUT1 through OUT16. lret = SdioOutputWord( ndevice, IFSDIO_OUT1_16, Value ); // Writes to OUT1 through OUT32. lret = SdioOutputDword( ndevice, IFSDIO_OUT1_32, Value ); The method above shows how to write the the output status every 8 pins, 16 pins, and 32 pins. The method below shows how to specify the output range. // Writes to OUT5, OUT6 and OUT7 lret = SdioOutputPoint( ndevice, &nbuffer[0], 5, 3 ); nbuffer must have three or more factors. The values must be set to nbuffer in advance. The configured values for nbuffer [0], [1], and [2] are written to OUT3, OUT4, and OUT5. 17

18 Retrieving Data 1. Configures the polarity of STB. // Configures to latch on the falling edge of STB. lret = SdioSetLatchLogic( ndevice, IFSDIO_FALL_EDGE ); 2. Configures the behavior at interrupt request from STB. // registers the callback function, CallBackProc lret = SdioSetEvent( ndevice, NULL, 0, NULL, CallBackProc, 0); The method above is an example using the callback. The SdioSetEvent function can configure the callback processing. The callback function that specified by the SdioSetEvent function is called when STB is input. Please refer to Callback Function for more detail. 3. Enables the interrupt at STB input. // Interrupts on the falling edge. lret = SdioSetEventLogic( ndevice, IFSDIO_FALL_EDGE ); 4. Reads the pin status that is latched by STB input in the CallBackProc function. // Reads the pin status of IN1 through IN8. lret = SdioInputLatchByte( ndevice, IFSDIO_IN1_8, &Value ); // Reads the pin status of IN1 through IN16. lret = SdioInputLatchWord( ndevice, IFSDIO_IN1_16, &Value ); // Reads the pin status of IN1 through IN32. lret = SdioInputLatchDword( ndevice, IFSDIO_IN1_32, &Value ); The method above shows how to read the pin status every 8 pins, 16 pins, and 32 pins. The method below shows how to specify the pin range. // Reads the pin status of IN5, IN6 and IN7 lret = SdioInputLatchPoint( ndevice, &nbuffer[0], 5, 3 ); nbuffer must have three or more factors. 18

19 Closing the Port 1. If the STB input interrupt is configured, disables the interrrupt and releases the registered processing. // Releases the STB input interrupt. lret = SdioSetEventLogic( ndevice, 0); // Releases the processing at the STB input interrupt. lret = SdioSetEvent( ndevice, NULL, 0, NULL, NULL, 0); 2. Closes the device by the SdioClose function. lret = SdioClose( ndevice); 3.13 Loading Driver Option The following parameters can be configured at loading the driver. cp4141 Driver Parameter cp4141_ttyname cp4141_calloutname cp4141_ttymajor cp4141_calloutmajor cp4141_minorstart cp4141_duplexmode Description Specifies the TTY device name. ttys is specified at the default setting. Specifies the callout device name. cua is specified at the default setting. Specifies the major number of the TTY device. 4 is specified at the default setting. Specifies the major number of the callout device. 5 is specified at the default setting. Specifies the head of the minor number of the serial port. 64 is specified at the default setting. Specifies the communication mode in RS-485 after loading the driver. Full-duplex transmission is specified at the default setting. Refer to the following for configuration. full Full-duplex transmission half2w Two-wire half-duplex transmission half4w Four-wire half-duplex transmission cp4161 Driver Parameter cp4161_ttyname cp4161_calloutname cp4161_ttymajor cp4161_calloutmajor cp4161_minorstart cp4161_duplexmode Description Specifies the TTY device name. ttyg is specified at the default setting. Specifies the callout device name. cug is specified at the default setting. Specifies the major number of the TTY device. 40 is specified at the default setting. Specifies the major number of the callout device. 41 is specified at the default setting. Specifies the head of the minor number of the serial port. 0 is specified at the default setting. full Full-duplex transmission half2w Two-wire half-duplex transmission half4w Four-wire half-duplex transmission 19

20 cp4201 Driver Parameter cp4201_ttyname cp4201_calloutname cp4201_ttymajor cp4201_calloutmajor cp4201_minorstart cp4201_duplexmode Description Specifies the TTY device name. ttyg is specified at the default setting. Specifies the callout device name. cug is specified at the default setting. Specifies the major number of the TTY device. 48 is specified at the default setting. Specifies the major number of the callout device. 49 is specified at the default setting. Specifies the head of the minor number of the serial port. 0 is specified at the default setting. full Full-duplex transmission half2w Two-wire half-duplex transmission half4w Four-wire half-duplex transmission Example) #modprobe cp4141 cp4141_ttyname=ttyh cp4141_ttymajor=45 cp4141_minorstart=0 Specify the TTY device name, major number of the TTY device, and the head of the minor number to ttyh, 45, and 0, respectively. 20

21 3.14 The /proc File System The /proc file system allows you to confirm the state of the serial port configuration. Refer to the following table. Item Description Device node Displays the device node. Board type Displays the product type. RSW1 setting value is displayed. For CardBus cards, card ID number is displayed. Baud rate Displays the current baud rate. Communication mode Displays the current communication mode in RS-485. FD Full-duplex transmission HD2W Two-wire half-duplex transmission HD4W Four-wire half-duplex transmission Number of bytes of data that have been transmitted or received. Displays the total number of bytes of data that have been transmitted or received. - tx means bytes of transmitted data. - rx means bytes of received data. State of the control signals Displays the asserted control signals. RTS RS-232C The RS signal is asserted. RS-485 The C signal is asserted. ER The ER signal is asserted. CTS RS-232C The CS signal is asserted. RS-485 The I signal is asserted. DR The DR signal is asserted. CI The CI signal is asserted. CD The CD signal is asserted. Example) #cat /proc/tty/driver/cp4141 ttys64: PCI-4141(bid=0h)CH1 [9600bps] tx:812 rx:4312 RTS CTS ttys65: PCI-4141(bid=0h)CH2 [9600bps] tx:4312 rx:812 RTS CTS ttys66: PCI-4142(bid=0h)CH1 [9600bps HD2W] tx:0 rx:0 ttys67: PCI-4142(bid=0h)CH2 [9600bps HD2W] tx:0 rx:0 21

22 3.15 Configuring the Device Numbers 1. Start the device number setting utility dpg0101. #dpg0101 -c 2. When the device number setting utility starts, the following information and prompt will be displayed. ===================================================== Ref.ID Bus Dev Func Model RSW CBI ===================================================== Code Ref. ID Bus Dev Func Model RSW1 Reference ID of the board Bus number that card is inserted Device number that card is inserted Device number that card is inserted Model number of the board RSW1 setting value Description To change the ID number, select 1 at the menu and enter the index number of card to change. **************Command******************** 1. Change the board id number. 2. Run the device number setup utility. 99. Exit the program. ***************************************** Enter the command number: 1 Write the card ID number, 0 through 15, and press the return key. Enter Ref.ID: 1 Enter the board id number (0-15). If you want to cancel this operation, enter -1. : 1 To close the utility, write 99. Note: - When ID number is changed, restart the driver so that the system can recognise the ID number. - Put the ID number seal on your CardBus card. 22

23 Chapter 4 Reference (Asynchronous Serial Communications) 4.1 List of Functions The following functions are the Linux standard serial functions (termios). No. Function Description 1 open Opens a port. 2 close Closes the port. 3 tcsetattr Configures the port. 4 tcgetattr Retrieves the port configuration. 5 write Transmits data. 6 read Reads received data. 7 tcflush Clears transmit and receive buffer. 8 ioctl Controls the communication port. Refer to the appropriate information about termios. The following sources of information are examples. >> General Informaiton >> Programming >> Others

24 4.2 List of IOCTL Request Code The ioctl system call configures control signal and break signal transmission. The extended ioctl code controls the baud rate and sets full-duplex or half-duplex. No. Request Description 1 TCSBRK Sends the break signal. 2 TIOCMGET Retrieves the state of the control signals 3 TIOCMBIS RS-232C Asserts the RS and ER signals. RS-485 (Full-duplex) Asserts the C signal. RS-485 Enables the transmit data line. (Half-duplex) 4 TIOCMBIC RS-232C Deasserts the RS and ER signals. RS-485 (Full-duplex) Deasserts the C signal. RS-485 (Half-duplex) Enables the receive data line. 5 TIOCMSET Changes the output state of the RS and ER signals individually. 6 TIOCGSERIAL Retrieves the port information. 7 TIOCSSERIAL Configures the port information. 8 TIOCSERGETLSR Retrieves the state of transmit buffer on the communication controller. 9 CP4141_SET_BAUDRATE * Configures the baud rate. 10 CP4141_GET_BAUDRATE * Retrieves the baud rate configuration. 11 CP4141_SET_DUPLEX_MODE * Selects full-duplex or half-duplex transmission. 12 CP4141_GET_DUPLEX_MODE * Retrieves the setting whether full-duplex or half-duplex transmission. 13 CP4141_SET_FIFO_TRIGGER * Configures the FIFO tringger level. 14 CP4141_GET_FIFO_TRIGGER * Retrieves the FIFO trigger level. 15 CP4141_SET_HS_FUNCTION * Configres the extended functionality of a communication port settings. 16 CP4141_GET_HS_FUNCTION * Retrieves the extended functionality of communication port settings. 17 CP4141_GET_PORTINFO * Retrieves the hardware information of the communication port. Note: * These codes are described in 4.3 Extended ioctl. 24

25 4.3 Extended ioctl CP4141_SET_BAUDRATE The CP4141_SET_BAUDRATE request code configures the baud rate. int ioctl( int fd, CP4141_SET_BAUDRATE, unsigned long* BaudRate ); Parameters fd BaudRate Specifies the serial port file handle obtained by the open system call. Points to a variable containing the baud rate. Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT BaudRate refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. EINVAL The value of BaudRate is incorrect. Comments - The Linux standard serial functions only support the 18 following baud rates Using this API supports other baud rate. - Appropriate base clock frequency is selected and configured by this API automatically. So, you do not need to use an application to configure the base clock frequency. Example unsigned long BaudRate; BaudRate = ; ioctl(fd, CP4141_SET_BAUDRATE, &BaudRate); Configure the baud rate to bps. 25

26 4.3.2 CP4141_GET_BAUDRATE The CP4141_GET_BAUDRATE request code retrieves the baud rate configuration. int ioctl( int fd, CP4141_GET_BAUDRATE, unsigned long* Baudrate ); Parameters fd BaudRate Specifies the serial port file handle obtained by the open system call. Points to a vaiable to receive the baud rate. Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT BaudRate refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. Example unsigned long BaudRate; ioctl(fd, CP4141_GET_BAUDRATE, &BaudRate); Retrieve the baud rate configuration. 26

27 4.3.3 CP4141_SET_DUPLEX_MODE The CP4141_SET_DUPLEX_MODE request code selects full-duplex or half-duplex transmission. int ioctl( int fd, CP4141_SET_DUPLEX_MODE, unsigned long* DuplexMode ); Parameters fd DuplexMode Specifies the serial port file handle obtained by the open system call. Points to a variable containing the setting whether full-duplex or half-duplex transmission. Code CP4141_FULL_DUPLEX CP4141_HALF_DUPLEX_2W CP4141_HALF_DUPLEX_4W Error Description Full-duplex transmission Two-wire half-duplex transmission Four-wire half-duplex transmission Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT DuplexMode refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. EINVAL The value of DuplexMode is incorrect. The following models do not support the CP4141_SET_DUPLEX_MODE code: PCI-4141, PCI-4141P, PCI-4141PE, PCI-4144, PCI-4146, PCI-4148C, PCI-4150 (serial port), PCI-4155, CTP-4141, CTP-4141P, CTP-4142, CTP-4142P, CTP-4144, CTP-4146, CTP-4148, CPZ-4141, CPZ-4141P, CPZ-4142, CPZ-4142P, CPZ-4144, CPZ-4146, CPZ

28 Comment The following figures show two-wire half-duplex and four-wire half-duplex transmission. >> Two-Wire Half-Duplex Transmission T T Communication device SG SG Communication device T T: Transmit data line SG: Signal ground SG Communication device >> Four-Wire Half-Duplex Transmission T T Communication device R SG R SG Communication device T T: Transmit data line SG: Signal ground R: Receive data line R SG Communication device Example unsigned long DuplexMode; DuplexMode = CP4141_HALF_DUPLEX_2W; ioctl(fd, CP4141_SET_DUPLEX_MODE, &DuplexMode); Select two-wire half-duplex transmission. 28

29 4.3.4 CP4141_GET_DUPLEX_MODE The CP4141_GET_DUPLEX_MODE request code retrieves the setting whether full-duplex or half-duplex transmission. int ioctl( int fd, CP4141_GET_DUPLEX_MODE, unsigned long* DuplexMode ); Parameters fd DuplexMode Specifies the serial port file handle obtained by the open system call. Points to a variable to receive the setting whether full-duplex or half-duplex transmission. Code CP4141_FULL_DUPLEX CP4141_HALF_DUPLEX_2W CP4141_HALF_DUPLEX_4W Error Description Full-duplex transmission Two-wire half-duplex transmission Four-wire half-duplex transmission Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT DuplexMode refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. Example unsigned long DuplexMode; ioctl(fd, CP4141_GET_DUPLEX_MODE, &DuplexMode); Retrieve the setting whether full-duplex or half-duplex transmission. 29

30 4.3.5 CP4141_SET_FIFO_TRIGGER The CP4141_SET_FIFO_TRIGGER request code configures the FIFO tringger level. Int ioctl( int fd, CP4141_SET_FIFO_TRIGGER, struct fifo_trigger_level * FifoTrigger ); Parameters fd FifoTrigger Specifies the serial port file handle obtained by the open system call. Points to the structure containing the FIFO trigger level. Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT FifoTrigger refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. EINVAL The value of FifoTrigger is incorrect. Example struct fifo_trigger_level FifoTrigger; FifoTrigger.fifotx = UART_FCR654_T_TRIGGER_8; FifoTrigger.fiforx = UART_FCR_TRIGGER_4; ioctl(fd, CP4141_SET_FIFO_TRIGGER, &FifoTrigger); Configure the transmit FIFO trigger level and receive FIFO trigger level to 8 and 16, respectively (for the PCI-4141). Comment This ioctl request code is the same as TIOCSFIFOTRG request code of the GPG-4141 ver1.0x. The models listed below allow you to configure the receive trigger level from 1 to 7: PCI-4201xxQ, PCI-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, CTP-4201xxQ, CTP-4202xxQ, PCI-4661xx, LPC , LPC-4661xx, PEX , PEX-4661xx, CTP-4661xx, CPZ-4661xx, CSI , CSI , CSI , CSI , and CSI Specify a value in the FifoTrigger.fiforx as follows. Example) FifoTrigger.fiforx = UART_FCR4661_R_TRIGGER_EN + 5; Configure the receive trigger level to 5. 30

31 4.3.6 CP4141_GET_FIFO_TRIGGER The CP4141_GET_FIFO_TRIGGER request code retrieves the FIFO trigger level. int ioctl( int fd, CP4141_GET_FIFO_TRIGGER, struct fifo_trigger_level * FifoTrigger ); Parameters fd FifoTrigger Specifies the serial port file handle obtained by the open system call. Points to the structure to contain the FIFO trigger level. Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT FifoTrigger refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. Example struct fifo_trigger_level FifoTrigger; ioctl(fd, CP4141_GET_FIFO_TRIGGER, &FifoTrigger); Retrieve the FIFO trigger level. Comment This ioctl request code is the same as TIOCGFIFOTRG request code of the GPG-4141 ver1.0x. 31

32 4.3.7 CP4141_SET_HS_FUNCTION The CP4141_SET_HS_FUNCTION request code configures the extended functionality of communication port settings. int ioctl( int fd, CP4141_SET_HS_FUNCTION, PCP4141_HSFUNC HsFunc ); Parameters fd HsFunc Specifies the serial port file handle obtained by the open system call. Points to the structure containing extended functionality of a communication port settings. Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT HsFunc refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. EINVAL The communication port settings are invalid. The following models do not support the CP4141_SET_HS_FUNCTION code: PCI-4141, PCI-4141P, PCI-4141PE, PCI-4142, PCI-4142P, PCI-4142PE, PCI-4144, PCI-4145, PCI-4146, PCI-4147, PCI-4148C, PCI-4149C, PCI-4150 (serial port), PCI-4155, CTP-4141, CTP-4141P, CTP-4142, CTP-4142P, CTP-4144, CTP-4145, CTP-4146, CTP-4147, CTP-4148, CTP-4149, CPZ-4141, CPZ-4141P, CPZ-4142, CPZ-4142P, CPZ-4144, CPZ-4145, CPZ-4146, CPZ-4147, CPZ-4148, CPZ Example CP4141_HSFUNC HsFunc; ioctl(fd, CP4141_GET_HS_FUNCTION, &HsFunc); HsFunc.TxCSelect = CP4141_TXC_INTERNAL; HsFunc.RxCSelect = CP4141_RXC_EXTERNAL; HsFunc.HoldTime = 10000; HsFunc.SetupTime = 15000; ioctl(fd, CP4141_SET_HS_FUNCTION, &HsFunc); Configure the communication parameters as following table. Parameter Specification Transmit clock Internal clock Receive clock External clock Hold time 10 ms Setup time 15 ms 32

33 Comment The parameters are dependent on the product. Refer to the following table. Board Transmit Receive Hold Time Setup Time Monitor Clock Clock Mode PCI-4161 Supported Supported Supported Supported Not Supported CBI-4641, Not Not CBI WA, Supported Supported CSI , PCI-46610x, PCI-4202xxQ, CPZ-46610x, CPZ-4202xxQ, CTP-4202xxQ, CTP-46610x, LPC-46610x, PEX-46610x, CSI , CSI , CSI PCI-4661x0, PCI-4201xxQ, CPZ-4661x0, CPZ-4201xxQ, CTP-4201xxQ, CTP-4661x0, CSI , CSI , PEX , PEX-4661x0, LPC , LPC-4661x0 Other than above Not Supported Not Supported Not Supported Not Supported Not Supported Not Supported T/C Signal Not Supported Supported Supported Supported Not Supported Supported Supported Not Supported Supported Supported Not Supported Not Supported Not Supported Not Supported Not Supported Supported Not Supported 33

34 4.3.8 CP4141_GET_HS_FUNCTION The CP4141_GET_HS_FUNCITON request code retrieves the extended functionality of communication port settings. int ioctl( int fd, CP4141_GET_HS_FUNCTION, PCP4141_HSFUNC HsFunc ); Parameters fd HsFunc Specifies the serial port file handle obtained by the open system call. Points to the structure to contain the extended functionality of communication port settings. Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT HsFunc refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. Example CP4141_HSFUNC HsFunc; ioctl(fd, CP4141_GET_HS_FUNCTION, &HsFunc); Retrieve the extended functionality of a communication port settings. 34

35 4.3.9 CP4141_GET_PORTINFO The CP4141_GET_PORTINFO request code retrieves the hardware information of the communication port. int ioctl( int fd, CP4141_GET_PORTINFO, PCP4141_PORTINFO PortInfo ); Parameters fd PortInfo Specifies the serial port file handle obtained by the open system call. Points to the structure to contain the hardware information of the communication port. Return Value 0 is returned when the operation is successfully completed. Otherwise, -1 is returned, and information of the error is stored to errno. Code Error Description EBADF fd is not valid discriptor. EFAULT PortInfo refers to an inaccessible memory area. ENOTTY fd is not associated with a character special device. Reference Refer to Initializing a Port. Example int ret; CP4141_PORTINFO PortInfo; ret = ioctl(fd, CP4141_GET_PORTINFO, &PortInfo); Retrieve the hardware information of the communication port. 35

36 4.4 Structure fifo_trigger_level Structure The fifo_trigger_level structure contains the FIFO trigger level conditions. struct fifo_trigger_level { unsigned int fifotx; unsigned int fiforx; }; Member fifotx GPH-4141 Help for Linux Description Specifies the transmit FIFO trigger level. An interrupt occur when the data size in the transmit FIFO reaches the trigger level. This parameter has no meaning to the PCI-4201xxQ, PCI-4202xxQ, CTP-4201xxQ, CTP-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, PCI-4161,PCI-4661xx, LPC , LPC-4661xx, PEX , PEX-4661xx, CTP-4661xx, CPZ-4661xx, CBI-4641, CBI WA, CSI , CSI , CSI-4661xx, CSI , CSI , CSI <Other than above> Code FIFO Trigger Level UART_FCR654_T_TRIGGER_8 8 UART_FCR654_T_TRIGGER_16 16 UART_FCR654_T_TRIGGER_32 32 UART_FCR654_T_TRIGGER_56 56 fiforx Specifies the receive FIFO trigger level. This is a threshold value to read data in the FIFO buffer. <PCI-4155> Code FIFO Trigger Level UART_FCR_TRIGGER_1 1 UART_FCR_TRIGGER_4 4 UART_FCR_TRIGGER_8 8 UART_FCR_TRIGGER_14 14 <PCI-4161, CBI-4641, CBI WA, CSI > Code FIFO Trigger Level UART_FCR_TRIGGER_1 8 UART_FCR_TRIGGER_4 16 UART_FCR_TRIGGER_8 128 UART_FCR_TRIGGER_ <PCI-4201xxQ, PCI-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, CTP-4201xxQ, CTP-4202xxQ, PCI-4661xx, LPC , LPC-4661xx, PEX , PEX-4661xx, CTP-4661xx, CPZ-4661xx, CSI , CSI , CSI , CSI , CSI > Code FIFO Trigger Level UART_FCR4661_R_TRIGGER_EN 1 to 7 UART_FCR_TRIGGER_1 8 UART_FCR_TRIGGER_4 16 UART_FCR_TRIGGER_8 56 UART_FCR_TRIGGER_14 60 Configure a receive FIFO trigger level from 1 to 7 by using UART_FCR4661_R_TRIGGER_EN code for the PCI-4661xx, CTP-4661xx, and CPZ-4661xx. Type UART_FCR4661_R_TRIGGER_EN followed by one of the values from 1 through 7 in the FifoTrigger.fiforx. 36

37 <Other Boards> Code FIFO Trigger Level UART_FCR_TRIGGER_1 8 UART_FCR_TRIGGER_4 16 UART_FCR_TRIGGER_8 56 UART_FCR_TRIGGER_

38 4.4.2 CP4141_HSFUNC Structure The CP4141_HSFUNC structure contains members used to configure the extended functionality of a communication port. typedef struct { unsigned long TxCSelect; unsigned long RxCSelect; unsigned long HoldTime; unsigned long SetupTime; unsigned long Mode; unsigend long SignalMode; } CP4141_HSFUNC, *PCP4141_HSFUNC; Member TxCSelect RxCSelect HoldTime Description Selects an internal or external clock for the transmit clock. Code Description CP4141_TXC_INTERNAL An internal clock is used for the transmit clock. CP4141_TXC_EXTERNAL An external clock is used for the transmit clock. Selects an internal or external clock for the receive clock. Code Description CP4141_RXC_INTERNAL An internal clock is used for the receive clock. CP4141_RXC_EXTERNAL An external clock is used for the receive clock. Configures hold time, in us, in half-duplex transmission mode. Definitions of the hold time depend on models. <For PCI-4161, CBI-4641, or CBI WA> The hold time is the interval between the end of data transmission and the deassertion of the RS signal. The range of setting values is from 1 through (1.5 s). Note: us means microsecond. RS CS Data transmission S H H: hold time <For products other than above> The hold time is the interval between the end of data transmission and the deassertion of the TXE or RS signal. The range of setting values is from 1 through (150 ms). Note: us means microsecond. RS Data transmission S H H: hold time 38

39 The following table shows models and the setting values. Model RATE CLK (μs) PCI-4661xx, CTP-4661xx, RATE = 0 to 15 CPZ-4661xx, PCI-4201xxQ, CLK = 1, 10, 100, 1000, PCI-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, CSI , CSI , CSI , CSI , CSI , PEX , PEX-4661xx, LPC , LPC-4661xx, CTP-4201xxQ, CTP-4202xxQ, CSI PCI-4161, CBI-4641, RATE = 0 to 15 CBI WA CLK = 1, 10, 100, 1000, 10000, Other than above 0 to (μs) SetupTime Configures setup time, in us, in half-duplex transmission mode. Definitions of the setup time depend on models. <For PCI-4161,CBI-4641,CBI WA> The setup time is the interval between the assertion of the CS signal and the start of data writing. An applicable setting values are the same as HoldTime. Note: us means microsecond. RS CS Data S H S: setup time <For models other than above> The setup time is the interval between the assertion of the TXE or RS signal and the start of data writing. An applicable setting values are the same as HoldTime. Note: us means microsecond. RS Data S H S: setup time The following table shows models and the setting values. Model RATE CLK (μs) PCI-4661xx, CTP-4661xx, RATE = 0 to 15 CPZ-4661xx, PCI-4201xxQ, CLK = 1, 10, 100, 1000, PCI-4202xxQ, CPZ-4201xxQ, CPZ-4202xxQ, CSI , CSI , CSI , CSI , CSI , PEX , PEX-4661xx, LPC , LPC-4661xx, CTP-4201xxQ, CTP-4202xxQ, CSI PCI-4161, CBI-4641, RATE = 0 to 15 CBI WA CLK = 1, 10, 100, 1000, 10000, Other than above 0 to (μs) 39

40 Mode SignalMode Configures the port. Code Description CP4141_MONITOR_DISABLE Disables the monitor mode. CP4141_MONITOR_RSCS Enables the monitor mode (RS/CS connection). CP4141_MONITOR_RSCD Enables the monitor mode (RS/CD connection). Configures T and C signals for the RS-485 communications. Specify a value as the sum of each selected code from C and T. Signal Code Description C CP4141_C_INVALID Normally disables the C signal. CP4141_C_TXE Enables the C signal when the TXE signal is 1. Disables the C signal when the TXE signal is 0. CP4141_C_NOT_TXE Enables the C signal when the TXE signal is 1. Disables the C signal when the TXE signal is 0. CP4141_C_VALID Normally enables the C signal. T CP4141_T_TXE Enables the T signal when the TXE signal is 1. Disables the T signal when the TXE signal is 0. CP4141_T_VALID Normally enables the T signal. 40

41 4.4.3 CP4141_PORTINFO Structure The CP4141_PORTINFO structure contains the hardware information of the port. typedef struct { int StructVersion; int StructLength; int MinorNumber; int VendorID; int DeviceID; int SubsystemID; int RevisionID; int BoardID; int ChannelNumber; int BaseAddress; int IrqNumber; } CP4141_PORTINFO, *PCP4141_PORTINFO Member StructVersion StructLength MinorNumber VendorID DeviceID SubsystemID RevisionID BoardID ChannelNumber BaseAddress IrqNumber Description Stores the version information of the CP4141_PORTINFO structure. Stores the size of the CP4141_PORTINFO structure. Stores the minor number of the device node. Stores the Vendor ID of the communication board. Stores the Device ID of the communication board. Stores the Subsystem ID of the communication board. Stores the Revision ID of the communication board. Stores the RSW1 setting value of the communication board. Stores the channel number of the communication board. Stores the I/O port address of the communication board. Stores the interrupt line number. 41

42 The following tables show the Device ID and Subsystem ID of each product. PCI Expansion Boards (PCI series) Board Device ID Subsystem ID PCI (102Dh) 0001h PCI-4141P PCI-4141PE 4141 (102Dh) 0011h PCI (102Eh) 0001h PCI-4142P PCI-4142PE 4142 (102Eh) 0011h PCI (1030h) 0001h PCI (1031h) 0001h PCI (1032h) 0001h PCI (1033h) 0001h PCI-4148C (Channel 1 through channel 4) 4148 (1034h) 0001h PCI-4148C (Channel 5 through channel 8) 4148 (1034h) 0002h PCI-4149C (Channel 1 through channel 4) 4149 (1035h) 0001h PCI-4149C (Channel 5 through channel 8) 4149 (1035h) 0002h PCI (1036h) 0001h PCI (103Bh) 0001h PCI (1041h) 0001h PCI (1226h) 0001h PCI (1235h) 2081h PCI , PCI P 4661(1235h) 2082h PCI , PCI P 4661(1235h) 2094h PCI , PCI A, PCI P, PCI PA 4661(1235h) 2084h PCI , PCI A, PCI P, PCI PA 4661(1235h) 20A8h PCI (Channel 1 through channel 4) 4661(1235h) 2088h PCI (Channel 5 through channel 8) 4661(1235h) 2108h PCI (Channel 1 through channel 4) 4661(1235h) 20D0h PCI (Channel 5 through channel 8) 4661(1235h) 2150h PCI Q 4201(1069h) 2088h PCI Q 4201(1069h) 2090h PCI Q 4202(106Ah) 2088h PCI Q 4202(106Ah) 2090h LPC (FA1h) 208Bh LPC (1235h) 2082h LPC (1235h) 2084h LPC (1235h) 2094h LPC (1235h) 20A8h 42

DIO-BM(PCI/C-PCI)Linux/RT GPH-2X72C. Bus Master Digital Input/Output Board Driver Software for Linux/RTLinux. Help for Linux.

DIO-BM(PCI/C-PCI)Linux/RT GPH-2X72C. Bus Master Digital Input/Output Board Driver Software for Linux/RTLinux. Help for Linux. DIO-BM(PCI/C-PCI)Linux/RT GPH-2X72C Bus Master Digital Input/Output Board Driver Software for Linux/RTLinux Help for Linux www.interface.co.jp -Contents- Chapter 1 Introduction...4 1.1 Summary... 4 1.2

More information

TPMC860-SW-82. Linux Device Driver. 4 Channel Isolated Serial Interface RS232 Version 1.4.x. User Manual. Issue 1.4.

TPMC860-SW-82. Linux Device Driver. 4 Channel Isolated Serial Interface RS232 Version 1.4.x. User Manual. Issue 1.4. The Embedded I/O Company TPMC860-SW-82 Linux Device Driver 4 Channel Isolated Serial Interface RS232 Version 1.4.x User Manual Issue 1.4.4 December 2011 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek,

More information

TIP675-SW-82. Linux Device Driver. 48 TTL I/O Lines with Interrupts Version 1.2.x. User Manual. Issue November 2013

TIP675-SW-82. Linux Device Driver. 48 TTL I/O Lines with Interrupts Version 1.2.x. User Manual. Issue November 2013 The Embedded I/O Company TIP675-SW-82 Linux Device Driver 48 TTL I/O Lines with Interrupts Version 1.2.x User Manual Issue 1.2.5 November 2013 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany

More information

The Embedded I/O Company TIP700-SW-82 Linux Device Driver User Manual TEWS TECHNOLOGIES GmbH TEWS TECHNOLOGIES LLC

The Embedded I/O Company TIP700-SW-82 Linux Device Driver User Manual TEWS TECHNOLOGIES GmbH TEWS TECHNOLOGIES LLC The Embedded I/O Company TIP700-SW-82 Linux Device Driver Digital Output 24V DC Version 1.2.x User Manual Issue 1.2.1 February 2009 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 Phone: +49 (0) 4101 4058 0 25469

More information

Experiment Number: 02. Title: PC-to-PC communication through RS-232 port

Experiment Number: 02. Title: PC-to-PC communication through RS-232 port R (2) N (5) Oral (3) Total (10) Dated Sign Experiment Number: 02 Title: PC-to-PC communication through RS-232 port OBJECTIVES: 1. To learn to perform PC-to-PC communication using the RS-232 port 2. To

More information

Communication. Serial port programming

Communication. Serial port programming Applied mechatronics Communication. Serial port programming Sven Gestegård Robertz sven.robertz@cs.lth.se Department of Computer Science, Lund University 2017 Outline 1 Introduction 2 Terminal I/O programming

More information

CARRIER-SW-82. Linux Device Driver. IPAC Carrier Version 2.2.x. User Manual. Issue November 2017

CARRIER-SW-82. Linux Device Driver. IPAC Carrier Version 2.2.x. User Manual. Issue November 2017 The Embedded I/O Company CARRIER-SW-82 Linux Device Driver IPAC Carrier Version 2.2.x User Manual Issue 2.2.0 November 2017 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany Phone: +49 (0)

More information

TDRV002-SW-82. Linux Device Driver. Multi-Channel Serial Interface Version 1.8.x. User Manual. Issue November 2017

TDRV002-SW-82. Linux Device Driver. Multi-Channel Serial Interface Version 1.8.x. User Manual. Issue November 2017 The Embedded I/O Company TDRV002-SW-82 Linux Device Driver Multi-Channel Serial Interface Version 1.8.x User Manual Issue 1.8.3 November 2017 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany

More information

TPMC868-SW-42. VxWorks Device Driver. 16 Channel Serial PMC. Version 2.1.x. User Manual. Issue December 2011

TPMC868-SW-42. VxWorks Device Driver. 16 Channel Serial PMC. Version 2.1.x. User Manual. Issue December 2011 The Embedded I/O Company TPMC868-SW-42 VxWorks Device Driver 16 Channel Serial PMC Version 2.1.x User Manual Issue 2.1.0 December 2011 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany Phone:

More information

OPTO32A 24 Input Bit, 8 Output Bit Optical Isolator Board

OPTO32A 24 Input Bit, 8 Output Bit Optical Isolator Board OPTO32A 24 Input Bit, 8 Output Bit Optical Isolator Board PMC-OPTO32A Linux Device Driver User Manual Manual Revision: July 15, 2005 General Standards Corporation 8302A Whitesburg Drive Huntsville, AL

More information

TCP866-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. 8 Channel Serial PMC Version 1.0.x. Issue 1.

TCP866-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. 8 Channel Serial PMC Version 1.0.x. Issue 1. The Embedded I/O Company TCP866-SW-82 Linux Device Driver 8 Channel Serial PMC Version 1.0.x User Manual Issue 1.0 December 2003 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek / Germany Phone: +49-(0)4101-4058-0

More information

TPMC917-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. 4 MB SRAM with Battery Backup and 4 Channel Serial Interface Version 1.0.

TPMC917-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. 4 MB SRAM with Battery Backup and 4 Channel Serial Interface Version 1.0. The Embedded I/O Company TPMC917-SW-82 Linux Device Driver 4 MB SRAM with Battery Backup and 4 Channel Serial Interface Version 1.0.x User Manual Issue 1.0.1 November 2006 TEWS TECHNOLOGIES GmbH Am Bahnhof

More information

LAP-B(PCI/C-PCI) GPF LAP-B Communications Driver Software for for Windows. Help for Windows.

LAP-B(PCI/C-PCI) GPF LAP-B Communications Driver Software for for Windows. Help for Windows. LAP-B(PCI/C-PCI) GPF-4115 LAP-B Communications Driver Software for for Windows Help for Windows www.interface.co.jp Contents Chapter 1 Introduction 4 1.1 Overview4 1.2 Features.4 Chapter 2 Product Specifications

More information

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels.

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels. Modular PCI Range of Cards Summary features Modular Architecture Interface compatible with PCI Local bus Specification, revision 2.1, June 1995 2 or 4 Module General Purpose Carrier Cards 8 Channels per

More information

TIP570-SW-95 QNX-Neutrino Device Driver TIP570 16/8 Channel 12 Bit ADC and 8 Channel 12 Bit DAC on SBS PCI40 Carrier

TIP570-SW-95 QNX-Neutrino Device Driver TIP570 16/8 Channel 12 Bit ADC and 8 Channel 12 Bit DAC on SBS PCI40 Carrier TIP570-SW-95 QNX-Neutrino Device Driver TIP570 16/8 Channel 12 Bit ADC and 8 Channel 12 Bit DAC on SBS PCI40 Carrier Version 1.0.x Reference Manual Issue 1.0 January 2002 TEWS TECHNOLOGIES GmbH Am Bahnhof

More information

sllin TTY discipline for UART-LIN device implementation P. Píša, R. Lisový, M. Sojka Czech Technical University in Prague DRAFT

sllin TTY discipline for UART-LIN device implementation P. Píša, R. Lisový, M. Sojka Czech Technical University in Prague DRAFT sllin TTY discipline for UART-LIN device implementation P. Píša, R. Lisový, M. Sojka Czech Technical University in Prague August 27, 2012 Version f510653 Abstract This document describes sllin TTY line

More information

TDRV011-SW-82. Linux Device Driver. Extended CAN Bus Version 1.0.x. User Manual. Issue April 2018

TDRV011-SW-82. Linux Device Driver. Extended CAN Bus Version 1.0.x. User Manual. Issue April 2018 The Embedded I/O Company TDRV011-SW-82 Linux Device Driver Extended CAN Bus Version 1.0.x User Manual Issue 1.0.6 April 2018 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany Phone: +49 (0)

More information

Internet of Things: Using MRAA to Abstract Platform I/O Capabilities

Internet of Things: Using MRAA to Abstract Platform I/O Capabilities Internet of Things: Using MRAA to Abstract Platform I/O Capabilities Integrated Computer Solutions, Inc. Contents 1. Abstract... 3 2. MRAA Overview... 3 2.1. Obtaining MRAA APIs and API Documentation...

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight Exercise 7 due Monday (out later today) POSIX Portable Operating System Interface Family of standards specified by the

More information

PCI Express 4-Port Industrial Serial I/O Cards

PCI Express 4-Port Industrial Serial I/O Cards PCI Express 4-Port Industrial Serial I/O Cards The PCIe-400i and PCIe-400i-SI PCI Express 4-port industrial serial I/O cards are plug & play high-speed serial I/O expansion cards for the PCI Express bus.

More information

Hierarchy of I/O Control Devices

Hierarchy of I/O Control Devices Hierarchy of I/O Control Devices 8155 I/O + Timer 2 Port (A,B), No Bidirectional HS mode (C) 4 mode timer 8253/54 Timer 6 mode timer 8255 I/O 2 Port (A,B) A is Bidirectional HS mode (C) Extra controls

More information

TPMC901-SW-95. QNX4 - Neutrino Device Driver. User Manual. The Embedded I/O Company. 6/4/2 Channel Extended CAN-Bus PMC

TPMC901-SW-95. QNX4 - Neutrino Device Driver. User Manual. The Embedded I/O Company. 6/4/2 Channel Extended CAN-Bus PMC The Embedded I/O Company TPMC901-SW-95 QNX4 - Neutrino Device Driver 6/4/2 Channel Extended CAN-Bus PMC User Manual Issue 1.0 Version 1.0.0 October 2002 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek

More information

Learn how to communicate

Learn how to communicate USART 1 Learn how to communicate Programmed I/O (Software Polling) Interrupt Driven I/O Direct Memory Access (DMA) 2 Programmed I/O (Polling) Processor must read and check I/O ready bits for proper value

More information

HE-GE Linux USB Driver - User Guide. 1vv r2 03/25/2013

HE-GE Linux USB Driver - User Guide. 1vv r2 03/25/2013 Disclaimer SPECIFICATIONS SUBJECT TO CHANGE WITHOUT NOTICE Notice While reasonable efforts have been made to assure the accuracy of this document, Telit assumes no liability resulting from any inaccuracies

More information

TPMC680-SW-82. Linux Device Driver. 64 Digital Input/Output Version 1.1.x. User Manual. Issue April 2010

TPMC680-SW-82. Linux Device Driver. 64 Digital Input/Output Version 1.1.x. User Manual. Issue April 2010 The Embedded I/O Company TPMC680-SW-82 Linux Device Driver 64 Digital Input/Output Version 1.1.x User Manual Issue 1.1.3 April 2010 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany Phone:

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight HW2 Due Thursday, July 19 th Midterm on Monday, July 23 th 10:50-11:50 in TBD (And regular exercises in between) POSIX

More information

Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of

Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of this interface, which is widely used for serial communications.

More information

USART. USART stands for Universal Synchronous Asynchronous Receiver Transmitter. Full-duplex NRZ asynchronous serial data transmission

USART. USART stands for Universal Synchronous Asynchronous Receiver Transmitter. Full-duplex NRZ asynchronous serial data transmission USART 1 USART USART stands for Universal Synchronous Asynchronous Receiver Transmitter Full-duplex NRZ asynchronous serial data transmission Offer wide ranges of baud rate 2 Serial communication Can support

More information

Serial Interfacing. Pulse width of 1 bit

Serial Interfacing. Pulse width of 1 bit ١ ٢ Asynchronous Frame 10 bits 7E1 (7 data bits, even parity, 1 stop bit) Serial Data Transfer used by keyboards, plotters, modems and other peripherals with low data transfer rates (low bandwidth) * *

More information

JetBox 95xx/ 93xx Linux Auto Run Function

JetBox 95xx/ 93xx Linux Auto Run Function JetBox 95xx/ 93xx Linux Auto Run Function User Manual www.korenix.com 0.0.9 Copyright Notice Copyright 2009 Korenix Technology Co., Ltd. All rights reserved. Reproduction without permission is prohibited.

More information

PCI Express 16-Port Serial I/O Cards

PCI Express 16-Port Serial I/O Cards PCI Express 16-Port Serial I/O Cards The PCIe-1600 PCI Express 16-port serial I/O card is a plug & play high-speed serial I/O expansion card for PCI Express bus. Connecting to a PCI Express bus on your

More information

Serial Interfacing. Asynchronous Frame

Serial Interfacing. Asynchronous Frame Serial Interfacing Serial Data Transfer used by keyboards, plotters, modems and other peripherals with low data transfer rates (low bandwidth) 2 Types: Asynchronous CPU and device are not using a common

More information

24DSI32 24DSI12 24-bit, 32 Channel Delta-Sigma A/D Boards

24DSI32 24DSI12 24-bit, 32 Channel Delta-Sigma A/D Boards 24DSI32 24DSI12 24-bit, 32 Channel Delta-Sigma A/D Boards PCI-24DSI32 PMC-24DSI12 Linux Device Driver User Manual Manual Revision: July 7, 2005 General Standards Corporation 8302A Whitesburg Drive Huntsville,

More information

TIP120-SW-42. VxWorks Device Driver. Motion Controller with Incremental Encoder Interface. Version 2.1.x. User Manual. Issue 2.1.

TIP120-SW-42. VxWorks Device Driver. Motion Controller with Incremental Encoder Interface. Version 2.1.x. User Manual. Issue 2.1. The Embedded I/O Company TIP120-SW-42 VxWorks Device Driver Motion Controller with Incremental Encoder Interface Version 2.1.x User Manual Issue 2.1.0 May 2010 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469

More information

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision 1.00 For Use With Analog Devices ADSP-SC58x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3 For Use With Analog Devices ADSP-BF70x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

TIP610-SW-95 QNX-Neutrino Device Driver TIP610 16/20 Channel Digital I/O on SBS PCI40 Carrier

TIP610-SW-95 QNX-Neutrino Device Driver TIP610 16/20 Channel Digital I/O on SBS PCI40 Carrier TIP610-SW-95 QNX-Neutrino Device Driver TIP610 16/20 Channel Digital I/O on SBS PCI40 Carrier Version 1.0.x Reference Manual Issue 1.0 January 2002 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 D-25469 Halstenbek

More information

User Manual VScom PCI Cards VScom Industrial Card

User Manual VScom PCI Cards VScom Industrial Card User Manual VScom PCI Cards VScom Industrial Card Edition: July 2011 Tel: +49 40 528 401 0 Fax: +49 40 528 401 99 Web: www.visionsystems.de Support: service@visionsystems.de The software described in this

More information

Device: MOD This document Version: 1.0. Matches module version: v3 [29 June 2016] Date: 23 October 2017

Device: MOD This document Version: 1.0. Matches module version: v3 [29 June 2016] Date: 23 October 2017 Device: MOD-1025 This document Version: 1.0 Matches module version: v3 [29 June 2016] Date: 23 October 2017 Description: UART (async serial) to I2C adapter module MOD-1025 v3 datasheet Page 2 Contents

More information

CPCI-HPDI32ALT High-speed 64 Bit Parallel Digital I/O PCI Board 100 to 400 Mbytes/s Cable I/O with PCI-DMA engine

CPCI-HPDI32ALT High-speed 64 Bit Parallel Digital I/O PCI Board 100 to 400 Mbytes/s Cable I/O with PCI-DMA engine CPCI-HPDI32ALT High-speed 64 Bit Parallel Digital I/O PCI Board 100 to 400 Mbytes/s Cable I/O with PCI-DMA engine Features Include: 200 Mbytes per second (max) input transfer rate via the front panel connector

More information

Serial Communication. Simplex Half-Duplex Duplex

Serial Communication. Simplex Half-Duplex Duplex 1.5. I/O 135 Serial Communication Simplex Half-Duplex Duplex 136 Serial Communication Master-Slave Master Master-Multi-Slave Master Slave Slave Slave (Multi-)Master Multi-Slave Master Slave Slave Slave

More information

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features of this USART interface, which is widely used for serial

More information

PCIe-400 USER S MANUAL

PCIe-400 USER S MANUAL PCIe-400 USER S MANUAL 2017 May Edition Titan Electronics Inc. Web: www.titan.tw The computer programs provided with the hardware are supplied under a license. The software provided should be used only

More information

TPMC500-SW-42. VxWorks Device Driver. User Manual. The Embedded I/O Company. 32 Channel 12 Bit ADC. Version 2.0.x. Issue 2.0.

TPMC500-SW-42. VxWorks Device Driver. User Manual. The Embedded I/O Company. 32 Channel 12 Bit ADC. Version 2.0.x. Issue 2.0. The Embedded I/O Company TPMC500-SW-42 VxWorks Device Driver 32 Channel 12 Bit ADC Version 2.0.x User Manual Issue 2.0.0 October 2004 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 e-mail: info@tews.com 25469 Halstenbek

More information

TIP670-SW-95. QNX-Neutrino Device Driver. User Manual. The Embedded I/O Company. Digital I/O. Version 1.0.x. Issue August 2008.

TIP670-SW-95. QNX-Neutrino Device Driver. User Manual. The Embedded I/O Company. Digital I/O. Version 1.0.x. Issue August 2008. The Embedded I/O Company TIP670-SW-95 QNX-Neutrino Device Driver Digital I/O Version 1.0.x User Manual Issue 1.0.0 August 2008 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 Phone: +49 (0) 4101 4058 0 25469 Halstenbek,

More information

PL-2303 specific usb-uart serial communications manager for QNX Neutrino

PL-2303 specific usb-uart serial communications manager for QNX Neutrino Driver - Description devu-prolific2303-speed PL-2303 specific usb-uart serial communications manager for QNX Neutrino You must be root to start this driver. Syntax: devu-prolific2303 [[options] [u devicenr

More information

Features: Analog to Digital: 12 bit resolution TTL outputs, RS-232 tolerant inputs 4.096V reference (1mV/count) 115K max speed

Features: Analog to Digital: 12 bit resolution TTL outputs, RS-232 tolerant inputs 4.096V reference (1mV/count) 115K max speed The Multi-I/O expansion board gives users the ability to add analog inputs and outputs, UART capability (for GPS or modem) and isolated high current outputs to the Flashlite 386Ex. Available in several

More information

Section 3: File I/O, JSON, Generics. Meghan Cowan

Section 3: File I/O, JSON, Generics. Meghan Cowan Section 3: File I/O, JSON, Generics Meghan Cowan POSIX Family of standards specified by the IEEE Maintains compatibility across variants of Unix-like OS Defines API and standards for basic I/O: file, terminal

More information

TRP-C08S. USB To 1* RS232 and 1*RS422/485 Isolated Converter. User s Manual. Printed Jun Rev 1.2

TRP-C08S. USB To 1* RS232 and 1*RS422/485 Isolated Converter. User s Manual. Printed Jun Rev 1.2 TRP-C08S USB To 1* RS232 and 1*RS422/485 Isolated Converter User s Manual Printed Jun. 2007 Rev 1.2 Trycom Technology Co., Ltd 1F, No.2-11, Sihu street, Yingge Township, Taipei, Taiwan ROC Tel: 886-2-86781191,

More information

TRP-C08. USB to RS232/422/485 Isolated Converter. User s Manual. Printed Sep.2014 Rev 1.4

TRP-C08. USB to RS232/422/485 Isolated Converter. User s Manual. Printed Sep.2014 Rev 1.4 TRP-C08 USB to RS232/422/485 Isolated Converter User s Manual Printed Sep.2014 Rev 1.4 Trycom Technology Co.,Ltd No.35, Zhongxing Rd., Guishan Township, Taoyuan County 333, Taiwan. Tel : 886-3-350-3351

More information

Korenix JetCard Series Multiport Serial Card/Ethernet Switch Card User s Manual

Korenix JetCard Series Multiport Serial Card/Ethernet Switch Card User s Manual Korenix JetCard Series Multiport Serial Card/Ethernet Switch Card User s Manual Third Edition, Dec. 2008 www.korenix.com Korenix JetCard Series Multiport Serial Card/Ethernet Switch Card User s Manual

More information

TPMC810-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. Isolated 2x CAN Bus Version 1.2.x. Issue 1.2.

TPMC810-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. Isolated 2x CAN Bus Version 1.2.x. Issue 1.2. The Embedded I/O Company TPMC810-SW-82 Linux Device Driver Isolated 2x CAN Bus Version 1.2.x User Manual Issue 1.2.0 January 2006 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek / Germany Phone: +49-(0)4101-4058-0

More information

Advcan QNX Driver User Manual V1.02

Advcan QNX Driver User Manual V1.02 Advcan QNX Driver User Manual V1.02 Contents 1. Introduction...1 1.1. System Requirement...1 1.2. Driver configuration...1 2. AdvCan Data Structures...2 2.1. Canmsg_t Struct Reference...2 2.2. CanStatusPar

More information

COM-EX(PCI/C-PCI) GPF Windows Drivers Software for Asynchronous Serial Communications Product. Help for Windows.

COM-EX(PCI/C-PCI) GPF Windows Drivers Software for Asynchronous Serial Communications Product. Help for Windows. COM-EX(PCI/C-PCI) GPF-4161 Windows Drivers Software for Asynchronous Serial Communications Product Help for Windows www.interface.co.jp Contents Chapter 1 Introduction 5 1.1 Overview...5 1.2 Features...5

More information

Summer 2003 Lecture 21 07/15/03

Summer 2003 Lecture 21 07/15/03 Summer 2003 Lecture 21 07/15/03 Simple I/O Devices Simple i/o hardware generally refers to simple input or output ports. These devices generally accept external logic signals as input and allow the CPU

More information

MOXA Sync Board API Programmer s Manual

MOXA Sync Board API Programmer s Manual MOXA Sync Board API Programmer s Manual First Edition, Jan 2002 Moxa Technologies Co., Ltd. Tel: +866-2-8919-1230 Fax: +886-2-8919-1231 www.moxa.com service@moxa.com.tw MOXA Sync Board API Programmer s

More information

TRP-C08S. USB to 1 RS232 and 1 RS422/485 Isolated Converter. User s Manual

TRP-C08S. USB to 1 RS232 and 1 RS422/485 Isolated Converter. User s Manual TRP-C08S USB to 1 RS232 and 1 RS422/485 Isolated Converter User s Manual Printed Sep. 2014 Rev 1.4 Trycom Technology Co.,Ltd No.35, Zhongxing Rd., Guishan Township, Taoyuan County 333, Taiwan. Tel : 886-3-350-3351

More information

SCB-C08 USB to RS232/422/485 Converter

SCB-C08 USB to RS232/422/485 Converter SCB-C08 USB to RS232/422/485 Converter USB Interface RS-232 signal RS-422 signal: RS-485 signal: Cable Type Transmission distance Signal LED Direct power from USB port Power consumption: Compliant with

More information

Connection Guide (RS-232C)

Connection Guide (RS-232C) Programmable Controller CJ-series General-purpose Serial Connection Guide (RS-232C) MARS TOHKEN SOLUTION CO.LTD. Fixed Mount 2D Image Reader (MVF-300/500 Series) P679-E1-01 About Intellectual Property

More information

SIO-DLL. Serial I/O DLL. User Manual

SIO-DLL. Serial I/O DLL. User Manual SIO-DLL Serial I/O DLL User Manual SIO-DLL User Manual Document Part N 0127-0178 Document Reference SIO-DLL\..\0127-0178.Doc Document Issue Level 1.3 Manual covers software version 1 All rights reserved.

More information

T4-Input/Output Management

T4-Input/Output Management T4-Input/Output Management SO-Grade 2013-2014 Q2 License Aquest document es troba sota una llicència Reconeixement - No comercial - Compartir Igual sota la mateixa llicència 3.0 de Creative Commons. Per

More information

MOS INTEGRATED CIRCUIT

MOS INTEGRATED CIRCUIT DATA SHEET MOS INTEGRATED CIRCUIT µpd6708 IEBus (Inter Equipment Bus ) PROTOCOL CONTROL LSI DESCRIPTION The µpd6708 is a peripheral LSI for microcontrollers that controls the protocol of the IEBus. This

More information

UART Application Kit for Digi Embedded Linux User's Manual

UART Application Kit for Digi Embedded Linux User's Manual UART Application Kit for Digi Embedded Linux User's Manual Digi document reference number: 90000920_A Digi International Inc. 2008. All Rights Reserved. The Digi logo is a registered trademark of Digi

More information

TMS470R1x Serial Communication Interface (SCI) Reference Guide

TMS470R1x Serial Communication Interface (SCI) Reference Guide TMS470R1x Serial Communication Interface (SCI) Reference Guide Literature Number: SPNU196A September 2002 IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to

More information

Important Dates. October 27 th Homework 2 Due. October 29 th Midterm

Important Dates. October 27 th Homework 2 Due. October 29 th Midterm CSE333 SECTION 5 Important Dates October 27 th Homework 2 Due October 29 th Midterm String API vs. Byte API Recall: Strings are character arrays terminated by \0 The String API (functions that start with

More information

TPMC815-SW-72. LynxOS Device Driver. User Manual. The Embedded I/O Company. ARCNET Controller. Version 1.0.x. Issue 1.0 May 2004

TPMC815-SW-72. LynxOS Device Driver. User Manual. The Embedded I/O Company. ARCNET Controller. Version 1.0.x. Issue 1.0 May 2004 The Embedded I/O Company TPMC815-SW-72 LynxOS Device Driver ARCNET Controller Version 1.0.x User Manual Issue 1.0 May 2004 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek / Germany Phone: +49-(0)4101-4058-0

More information

Serial Programming Guide for POSIX Operating Systems 5th Edition. Michael R. Sweet Copyright , All Rights Reserved.

Serial Programming Guide for POSIX Operating Systems 5th Edition. Michael R. Sweet Copyright , All Rights Reserved. 5th Edition Michael R. Sweet Copyright 1994 1999, All Rights Reserved. Table of Contents Introduction...1 Chapter 1, Basics of Serial Communications...3 What Are Serial Communications?...3 What Is RS

More information

USING PCMCIA SERIAL FOUR-PORT WITH LINUX

USING PCMCIA SERIAL FOUR-PORT WITH LINUX NOTE TO USERS USING PCMCIA SERIAL FOUR-PORT WITH LINUX Contents Related Documentation This document contains instructions to help you install and configure the National Instruments serial hardware for

More information

AN4113 Application note

AN4113 Application note Application note Managing the Driver Enable signal for RS-485 and IO-Link communications with the STM32F05x USART Introduction RS-485 and IO-Link are half-duplex communication protocols that offer easy

More information

DM6420 Driver for Linux User s Manual Version 2.01.xx

DM6420 Driver for Linux User s Manual Version 2.01.xx User s Manual Version 2.01.xx SWM-640010014 rev C ISO9001 and AS9100 Certified RTD Embedded Technologies, INC. 103 Innovation Blvd. State College, PA 16803-0906 Phone: +1-814-234-8087 FAX: +1-814-234-5218

More information

M O T O R O L A C O M P U T E R G R O U P VME DRIVER FOR LINUX USER GUIDE

M O T O R O L A C O M P U T E R G R O U P VME DRIVER FOR LINUX USER GUIDE M O T O R O L A C O M P U T E R G R O U P VME DRIVER FOR LINUX USER GUIDE VME driver INTRODUCTION The VME driver provides a programmatic erface which application programs may use to configure and control

More information

TABLE OF CONTENTS. Communication Functions

TABLE OF CONTENTS. Communication Functions TABLE OF CONTENTS Chapter 1: Chapter 2: Chapter 3: Chapter 4: General Features....................................................... 1-1 Functions......................................................

More information

Key Switch Control Software Windows driver software for Touch Panel Classembly Devices

Key Switch Control Software Windows driver software for Touch Panel Classembly Devices IFKSMGR.WIN Key Switch Control Software Windows driver software for Touch Panel Classembly Devices Help for Windows www.interface.co.jp Contents Chapter 1 Introduction 3 1.1 Overview... 3 1.2 Features...

More information

Software Architecture Document: Addendum

Software Architecture Document: Addendum L3x UART Software Architecture Software Architecture Document: Addendum Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks,

More information

Intel Embedded System Design Contest

Intel Embedded System Design Contest Intel Embedded System Design Contest Technical Notes FPGA Peripheral Linux Driver Usage Notes Rev 0.00 Date: 2012/03/13 Technical Notes Document Information TYPE Key words Abstract FPGA, Peripherals, driver

More information

TIP114-SW-72. LynxOS Device Driver. User Manual. The Embedded I/O Company. 10 Channel Absolute Encoder Interface (SSI) Version 1.0.

TIP114-SW-72. LynxOS Device Driver. User Manual. The Embedded I/O Company. 10 Channel Absolute Encoder Interface (SSI) Version 1.0. The Embedded I/O Company TIP114-SW-72 LynxOS Device Driver 10 Channel Absolute Encoder Interface (SSI) Version 1.0.0 User Manual Issue 1.0 February 2004 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek

More information

Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465

Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465 Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465 Keywords: MAXQ, MAXQ610, UART, USART, serial, serial port APPLICATION NOTE 4465 Using the Serial Port on the

More information

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 17: Processes, Pipes, and Signals Cristina Nita-Rotaru Lecture 17/ Fall 2013 1 Processes in UNIX UNIX identifies processes via a unique Process ID Each process also knows

More information

TCP Channel Serial Interface RS232/RS422. Version 1.0. User Manual. Issue August 2014

TCP Channel Serial Interface RS232/RS422. Version 1.0. User Manual. Issue August 2014 The Embedded I/O Company TCP462 4 Channel Serial Interface RS232/RS422 Version 1.0 User Manual Issue 1.0.6 August 2014 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany Phone: +49 (0) 4101

More information

TRP-C08X. USB To 4 RS232/422/485 Converter. User s Manual

TRP-C08X. USB To 4 RS232/422/485 Converter. User s Manual TRP-C08X USB To 4 RS232/422/485 Converter User s Manual Printed Sep. 2014 Rev 1.2 Trycom Technology Co.,Ltd No.35, Zhongxing Rd., Guishan Township, Taoyuan County 333, Taiwan. Tel : 886-3-350-3351 Fax:

More information

RS-422A/485 Serial I/O Board with Isolation for PCI. Features. Cable & Connector (Option) Product Configuration List.

RS-422A/485 Serial I/O Board with Isolation for PCI. Features. Cable & Connector (Option) Product Configuration List. Ver..0 RS-A/ Serial I/O Board with Isolation for PCI ch ch COM-PD(PCI)H This board is a PCI bus interface board for performing RS-A/ serial communications with external devices. The has two RS-A/ serial

More information

Preliminary. PACKAGE - 28-pin MLP (5mm X 5mm) Example Circuit Diagram CP V. 48MHz Oscillator. USB Function Controller 512B EEPROM

Preliminary. PACKAGE - 28-pin MLP (5mm X 5mm) Example Circuit Diagram CP V. 48MHz Oscillator. USB Function Controller 512B EEPROM Preliminary Single-Chip USB to UART Bridge SINGLE-CHIP USB to UART DATA TRANSFER - Integrated USB Transceiver; No External Resistors Required - Integrated Clock; No External Crystal Required - Integrated

More information

MiniOS7 API Functions Reference Manual. (For C Language) Version 1.17, Jan 2015

MiniOS7 API Functions Reference Manual. (For C Language) Version 1.17, Jan 2015 MiniOS7 API Functions Reference Manual (For C Language) Version 1.17, Jan 2015 Original Writer:Tim Tsai Last Editer: Vic Tsai i-7188 series i-7188(d) i-7188xa(d) i-7188xb(d) i-7188xc(d) i-7188ex(d) i-7188ea(d)

More information

NPTEL Course Jan K. Gopinath Indian Institute of Science

NPTEL Course Jan K. Gopinath Indian Institute of Science Storage Systems NPTEL Course Jan 2012 (Lecture 18) K. Gopinath Indian Institute of Science Spinlocks & Semaphores Shared data betw different parts of code in kernel most common: access to data structures

More information

COSC Operating Systems Design, Fall Lecture Note: Unnamed Pipe and Shared Memory. Unnamed Pipes

COSC Operating Systems Design, Fall Lecture Note: Unnamed Pipe and Shared Memory. Unnamed Pipes COSC4740-01 Operating Systems Design, Fall 2001 Lecture Note: Unnamed Pipe and Shared Memory Unnamed Pipes Pipes are a form of Inter-Process Communication (IPC) implemented on Unix and Linux variants.

More information

N720 OpenLinux Software User Guide Version 1.0

N720 OpenLinux Software User Guide Version 1.0 N720 Hardware User Guide () N720 OpenLinux Software User Guide Version 1.0 Copyright Copyright 2017 Neoway Technology Co., Ltd. All rights reserved. No part of this document may be reproduced or transmitted

More information

MEC-COM-M134. User s Manual

MEC-COM-M134. User s Manual MEC-COM-M134 Mini PCI-e 4-port RS-232/422/485 serial board with power input User s Manual Third Edition, February 2014 Mini PCI-e Serial Card User s Manual 2 Table of Contents Chapter 1 Introduction 4

More information

Forcom Technology Co., Ltd. Intelligent RS-485/422 to RS-232 converter

Forcom Technology Co., Ltd. Intelligent RS-485/422 to RS-232 converter Forcom Technology Co., Ltd. Tel: +886-2-77296880 Fax: +8862-27055495 e-mail: info@forcomtech.com.tw URL: http://www.forcomtech.com.tw Intelligent RS-485/422 to RS-232 converter Model No.: R32TR1 AD-INT

More information

PCI, PCIe, cpci, and PC104+ Plus Modules

PCI, PCIe, cpci, and PC104+ Plus Modules PCI, PCIe, cpci, and PC104+ Plus Modules Data Sheets of TEWS I/O Modules and Carrier About TEWS TECHNOLOGIES TEWS TECHNOLOGIES is a leading solutions provider of embedded I/O and CPU products based on

More information

=0 Read/Write IER Interrupt Enable Register =1 Read/Write - Divisor Latch High Byte + 2

=0 Read/Write IER Interrupt Enable Register =1 Read/Write - Divisor Latch High Byte + 2 EEE 410 Microprocessors I Spring 04/05 Lecture Notes # 20 Outline of the Lecture Interfacing the Serial Port Serial Port registers Transmitting Serial Data Receiving Serial Data INTERFACING THE SERIAL

More information

QC Linux USB Driver - User Guide 1vv r7 04/11/2014

QC Linux USB Driver - User Guide 1vv r7 04/11/2014 QC Linux USB Driver - User Guide Disclaimer SPECIFICATIONS SUBJECT TO CHANGE WITHOUT NOTICE Notice While reasonable efforts have been made to assure the accuracy of this document, Telit assumes no liability

More information

TRP-C08M. USB To 4 RS232/422/485 Isolated Converter. User s Manual. Printed Jun Rev 1.0

TRP-C08M. USB To 4 RS232/422/485 Isolated Converter. User s Manual. Printed Jun Rev 1.0 TRP-C08M USB To 4 RS232/422/485 Isolated Converter User s Manual Printed Jun. 2013 Rev 1.0 Trycom Technology Co., Ltd 1F, No.2-11, Sihu street, Yingge Township, Taipei, Taiwan ROC Tel: 886-2-86781191,

More information

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers Application Note, V1.0, Jul. 2006 AP16095 XC16x Interfacing the XC16x Microcontroller to a Serial SPI EEPROM Microcontrollers Edition 2006-07-10 Published by Infineon Technologies AG 81726 München, Germany

More information

N720 OpenLinux Software User Guide Version 1.2

N720 OpenLinux Software User Guide Version 1.2 N720 Hardware User Guide () N720 OpenLinux Software User Guide Version 1.2 Copyright Copyright 2017 Neoway Technology Co., Ltd. All rights reserved. No part of this document may be reproduced or transmitted

More information

MiniOS7 API Functions Reference Manual. (For C Language) Version 1.0, 28 August 2007

MiniOS7 API Functions Reference Manual. (For C Language) Version 1.0, 28 August 2007 MiniOS7 API Functions Reference Manual (For C Language) Version 1.0, 28 August 2007 Original Writer:Tim Tsai Last Editer: Vic Tsai I-7188 series I-7188(D) I-7188XA(D) I-7188XB(D) I-7188XC(D) I-7188EX(D)

More information

USB to RS-232/RS422/485. US-101-I USB To Serial Operation Manual

USB to RS-232/RS422/485. US-101-I USB To Serial Operation Manual USB to RS-232/RS422/485 US-101-I USB To Serial Operation Manual First Edition, Jun 2008 Table of Contents 1. Introduction 2 2. Package checklist 3 3. Product Specification 4 4. Product Panel Views Description

More information

Concepts of Serial Communication

Concepts of Serial Communication Section 6. Serial Communication Communication Using Serial Interfaces: UART and SPI Concepts of Serial Communication Limitations of Parallel Bus Clock skew becomes a serious issue for high speed and long

More information

converter Tel: Fax:

converter Tel: Fax: USB4485 485 USB to 4 ports RS485/422 converter User manual Shenzhen 3onedata Technology Co.,Ltd Tel: +86-755-26702688 Fax: +86-755-26703485 www.3onedata.com Contents 1. Introduction...3 2. Packing List...

More information

TPMC Channel Serial Interface RS232/RS422. Version 1.0. User Manual. Issue August 2014

TPMC Channel Serial Interface RS232/RS422. Version 1.0. User Manual. Issue August 2014 The Embedded I/O Company TPMC461 8 Channel Serial Interface RS232/RS422 Version 1.0 User Manual Issue 1.0.6 August 2014 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany www.tews.com Phone:

More information

PCIe Card Selection Guide. PCIe-CAN Card. PCIe-COM Card. Taiwan Pulse Motion Co.,Ltd. Bus Interface PCI Express x 1 LPE-C122 PCE-C122D PCE-C122T

PCIe Card Selection Guide. PCIe-CAN Card. PCIe-COM Card. Taiwan Pulse Motion Co.,Ltd. Bus Interface PCI Express x 1 LPE-C122 PCE-C122D PCE-C122T PCIe Card Selection Guide PCIe-CAN Card Bus Interface PCI Express x 1 LPE-C122 PCE-C122D PCE-C122T Channels I/O Isolation Voltage Baud Rate Terminator Resistor I/O PIN Type 2 Max. 1 Mbps Jumper for 120

More information