EasyUSB

Click on the image to enlarge it.

EasyUSB characteristics

Jumper settings

Receive Data (RxD) and Clear to Send (CTS) inputs of MCP2200 chip are floating if jumpers are removed. EasyUSB board contains pull-up/pull-down resistors for RxD and CTS lines.

RxD pull-up resistor active (default)
RxD pull-down resistor active
CTS pull-down resistor active (default)
CTS pull-up resistor active

LED indicators

EasyUSB contains 8 LEDs. 6 yellow LEDs indicate P0-P5 state. Yellow LED lights when the corresponding P0..P5 output turned high level. P6 and P7 line can be configured as RX/TX indicator. This needs inverted logic, so the corresponding green LED lights if P6 or P7 turned low level.

Downloads

Python code

First make an "easyusb" folder in C drive and copy SimpleIO-UM.dll into this folder. You can find this file in MCP2200_DLL_2013-01-28.zip file. This code works with Python3.x 32 bit version. DOWNLOAD 32 BIT PYTHON ON 64 BIT SYSTEM ALSO!!! 32bit code will run on 64bit system. SimpleIO-UM.dll doesn't support 64 bit DLL calls, therefore it won't work with 64 bit development tools.

 from ctypes import *
 mydll=windll.LoadLibrary("C:\\easyusb\\SimpleIO-UM.dll")
 mydll.InitMCP2200(0x4d8,0x00df)
 mydll.ConfigureMCP2200(0,9600,0,0,False,False, False, False)

 mydll.SetPin(1)
		

This code establishes connection with MCP2200 using InitMCP2200 function. It's two arguments are VendorID and ProductID provided by Microchip. Next step is configuring IO lines, set up baudrate, etc. SetPin(1) function sets P1 high level. You can find more information in 2.3 chapter of MCP2200 Data Sheet. Most important fuctions are InitMCP2200, ConfigureMCP2200, SetPin, ClearPin, ReadPortValue, WritePort(portValue), ReadPinValue(pinnumber).

Led blinking example code

 from ctypes import *
 from time import sleep

 mydll=windll.LoadLibrary ("C:\\easyusb\\SimpleIO-UM.dll")
 mydll.InitMCP2200(0x4d8,0x00df)
 mydll.ConfigureMCP2200(0,9600,0,0,False,False, False, False)

 while True:
     mydll.SetPin(2)
     sleep(0.5)
     mydll.ClearPin(2)
     sleep(0.5)
  	

Lazarus example

A more complex example written in Lazarus (Delphi like Pascal code). Download here
This code works with Lazarus 32 bit version. DOWNLOAD 32 BIT LAZARUS ON 64 BIT SYSTEM ALSO!!! 32bit code will run on 64bit system. SimpleIO-UM.dll doesn't support 64 bit DLL calls, therefore it won't work with 64 bit development tools.