Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using MCP 2221 with Python

Status
Not open for further replies.

engr_joni_ee

Advanced Member level 3
Advanced Member level 3
Joined
Nov 3, 2018
Messages
822
Helped
2
Reputation
4
Reaction score
7
Trophy points
18
Activity points
6,874
Hi,

I normally use PIC 16F Microcontroller with MCP 2221 which serve as UART to USB bridge. The MCP 2221 device appear as Virtual Com and I just need to set Baud Rate in Putty to start communication PIC 16F Microcontroller. I guess UART to USB falls into CDC class.

I want to try MCP 2221 without PIC Microcontroller. Here I have some basic questions.

How about if I intend to control directly the GPIOs of MCP 2221 or to read I2C based temperature sensor connected to MCP 2221 and want to read temperature sensor through Python program without PIC Microcontroller. Would this be CDC class or HID class ? Would MCP 2221 device appear as Virtual Com or not ? Do I need to set Baud rate ?
 

HID for GPIO control is already mentioned on the product page. For detailed information, you want to read the datasheet.

1.1.1 ENUMERATION
The MCP2221 enumerates as a composite USB device after Power-on Reset (POR). The device enumerates as both a Human Interface Device (HID) for I2C, GPIO control, and as CDC for the USB-to-UART converter.
1.1.1.1 USB HID
The MCP2221 enumerates as an HID, so the device can be configured, while the I2C and GPIO can be controlled. A DLL package, with example applications and tools, is supplied by Microchip on the device web page on the Microchip web site, www.microchip.com.
1.1.1.2 USB CDC
The CDC enumeration implements the USB-to-UART data translation.
 

Hi, this means that for I2C and GPIO is HID class.

Would MCP 2221A device appear as Virtual Com in device manager if used for HID class application ? if yes, do we need to set Baud rate ?

Do I need any physical programmer if I use Circuit Python libraries from Adafruit ?

 

HID doesn't appear as virtual com port. Review the libraries provided my Microchip.

Nonvolatile configuration is set with MCP2221 configuration tool through USB, no programmer needed.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top