Table of Contents

CP-IO13-4C - IO Board Accessory for the ComfilePi 26 pin header

The CP-IO13-4C is an IO board accessory for the ComfilePi consisting of 7 bipolar digital inputs, 6 digital outputs, corresponding indicator LEDs, 2 RS-232C ports, all exposed through screw terminals. It can be mounted to the rear panel of the CPi-C070WR4C panel PCs.

C#/VB.Net Control Example

The following is an example project illustrating how to program the CP-IO13-4C in C# or VB.Net using the Mono Framework.

Source Code

This example application uses the following .NET libraries to control the digital inputs, outputs, and serial ports.

Python Example

The pigpio library also has a Python interface.

The following is an example illustrating digital inputs and outputs:

import pigpio
 
pi = pigpio.pi()
 
pi.set_mode(6, pigpio.INPUT)
pi.set_mode(19, pigpio.OUTPUT)
 
while True:
    if pi.read(6):
        pi.write(19, 1)
    else:
        pi.write(19, 0)
 
pi.stop()

Pin Map

The CP-IO13-4C pins are connected to the ComfilePi CPi-C's GPIO header as shown below.

Inputs: GPIO 6, 7, 10, 11, 16, 17, 18
Outputs: GPIO 19, 20, 21, 22, 23, 24

Specifications and IO Circuitry

Inputs

Outputs

Setting the Initial IO State

It may be necessary to modify the ComfilePi's initial GPIO output state to prevent the ComfilePi from turning the outputs ON when the ComfilePi boots.

Modify the ComfilePi's /boot/config.txt file with the following configuration to set the initial IO state. See GPIO control in config.txt for more information.

gpio=6-7=ip
gpio=10-11=ip
gpio=16-18=ip
gpio=19-24=op,pd,dl

To intitialize /dev/serial2 and /dev/serial3 add the following to the /boot/config.txt file.

dtoverlay=uart3,txd3_pin=4,rxd5_pin=1
dtoverlay=uart4,txd4_pin=8,rxd9_pin=1

COMFILE Technology's Documentation Library