Toxicantidote MCP220 interfacing test

Power status

Source: Grid power
Generation sources
 52.06%Black coal
 14.62%Brown coal
 13.69%Hydro
 9.86%Gas
 9.38%Wind
 0.36%Biomass

MCP220 interfacing test

July 2018

Description

Example code for controlling the GPIO ports on an MCP2200 device as used in the Denkovi 4 port USB relay board.

Confirmed working on Windows 7, Debian Sid and Ubuntu ARM.

Operation

To use this device, first we have to locate it. Once located, it is then claimed from the kernel and we connect to the HID endpoint provided by the device.

Commands sent to this device are 16 bytes long. The first byte is the command, and the 12th and 13th bytes are used for I/O control. The HID interface manual from Microchip describes this in detail.

Source

Hosted on Github