Looking for an economic substitute for the MCP2221A

Thread Starter

cmartinez

Joined Jan 17, 2007
8,748
I recently designed a circuit that needs to be interfaced to a PC via a USB port. For that purpose, I've used the MCP2221A chip, which is quite effective and easy to implement. The thing is that said chip has become the most expensive component (by far) in the design. Are there any other more economic alternatives out there that could be used instead?
 

Papabravo

Joined Feb 24, 2006
22,065
Once upon a time semiconductor companies were required to have 2nd sources for their parts in order for their parts to be designed into military equipment. Sadly, that is seldom the case, and we have a cornucopia of parts designed and manufactured by single companies. What that tells me is that Microchip is making excess profits on those single source parts while practically giving away other parts. Unless you can find a similar part from other sources you appear to be stuck with the original choice to use that part. Reproducing the function might be possible with three chips but then your board and assembly costs will rise.
 

nsaspook

Joined Aug 27, 2009
16,272
It's just a preprogrammed pic16 inside, (PIC16F1455 'like' ) and priced at a percentage above that baseline chip. If you design using a controller (for the needed application plus USB COM) with a USB module, you can roll the MCP2221A functionality into the software.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,748
If you design using a controller (for the needed application plus USB COM) with a USB module, you can roll the MCP2221A functionality into the software.
Many years ago I bought a book explaining how the USB protocol worked ... I gave up after a couple of chapters because it seemed way too complicated for my programming capabilities, and it would most probably take a prohibitive amount of time for me to get there ... I don't know if I could tackle that problem nowadays
 

nsaspook

Joined Aug 27, 2009
16,272
Many years ago I bought a book explaining how the USB protocol worked ... I gave up after a couple of chapters because it seemed way too complicated for my programming capabilities, and it would most probably take a prohibitive amount of time for me to get there ... I don't know if I could tackle that problem nowadays
You might save $1 without the MCP2221A if you can find a reliable substitute but is it really worth the time and effort for the expected number of boards made and sold?

It's not that hard for a simple COM CDC virtual serial port but most of the example code is in C.
https://github.com/johnnydrazzi/USB-Stack/tree/master
A PIC16 and PIC18 Device USB Stack. Supports all pingpong buffering types. Support for endpoints 0-7.

The USB stack has been compliance tested using USB-IF's USB 3 Command Verifier (USB3CV) tool.

Currently supports:
PIC16F1459 Family:

  • PIC16F1454
  • PIC16F1455
  • PIC16F1459
PIC18F4450 Family:

  • PIC18F2450
  • PIC18F4450
PIC18F4550 Family:

  • PIC18F2455
  • PIC18F4455
  • PIC18F2550
  • PIC18F4550
PIC18F4553 Family:

  • PIC18F2458
  • PIC18F4458
  • PIC18F2553
  • PIC18F4553
PIC18F1XK50 Family:

  • PIC18F13K50
  • PIC18F14K50
PIC18F45K50 Family:

  • PIC18F24K50
  • PIC18F25K50
  • PIC18F45K50
PIC18F46J50 Family:

  • PIC18F24J50
  • PIC18F44J50
  • PIC18F25J50
  • PIC18F45J50
  • PIC18F26J50
  • PIC18F46J50
PIC18F47J53 Family:

  • PIC18F26J53
  • PIC18F46J53
  • PIC18F27J53
  • PIC18F47J53
 

MrChips

Joined Oct 2, 2009
34,698
I looked into it a long time ago when USB first appeared. It was much too complicated for me to implement in software. I gave up. Then I found Silicon Labs CP2102 USB-to-UART bridge and this is what I use all the time now. It is easy to incorporate into a hw/sw project.

STM32 has a number of USB hw/sw functionality built-in their MCUs. I have yet to venture into this area.
 

Jon Chandler

Joined Jun 12, 2008
1,571
Take a look at the CH347 (Datasheet). It's made by the same company that makes the common CH340 USB–UART chips, and is in stock at LCSC for $3.50.

Also, check the WCH USB Product page for other options. They have a wide range of "USB to xxx" chips. I recently used a CH348 USB–Octal Serial chip to make a USB to 4 RS232 & 4 UART ports board. Simple to use and design. (I had 10 of these made – if one of these would be useful, send me a message).

Oh. Use a pc to look at the above page; it's hard to navigate on a phone.
 

Jon Chandler

Joined Jun 12, 2008
1,571
By the way.... Datasheets on LCSC are often in Chinese. The WCH site has decent datasheets in English for the parts I have looked at, and they've been very responsive when I've asked questions.
 

nsaspook

Joined Aug 27, 2009
16,272
At Digikey:


I think I'll stick with my first choice ... for now ...
You get a lot of bang for buck with the MCP22xxx series. It's not the best, it's not the fastest but it's cheap and reliable.

I used the MCP2210 as a USB to IMU interface.
1739830926914.png
Simple Java 3D cube display program using a Linux FIFO file to transfer data from the C program talking to the BMX160 IMU using SPI via the MCP2210 USB interface.
https://www.mouser.com/pdfdocs/BST-BMX160-DS000-11.pdf
1739831045431.png
MCP2210 interface code.

https://forum.allaboutcircuits.com/...2210-on-linux-with-libusb.179080/post-1691118
 

MrChips

Joined Oct 2, 2009
34,698
I did not check what is MCP2221A. I had wrongly assumed that it was an MCU with USB onboard.
For USB-to-UART bridge, there is also FTDI FT230XS.
 

Jon Chandler

Joined Jun 12, 2008
1,571
If you only need UART functionality, check out the CH340 and its brethren. Less than a buck, fast and easy to use. Drivers are standard in Windows and Linux. Some variants don't even require a crystal.

If you need more than one UART port, versions are available with 2, 4 or the aforementioned 8 ports.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,748
If you only need UART functionality, check out the CH340 and its brethren. Less than a buck, fast and easy to use. Drivers are standard in Windows and Linux. Some variants don't even require a crystal.

If you need more than one UART port, versions are available with 2, 4 or the aforementioned 8 ports.
Many, many thanks for the tip, Joe. I've just bought a couple dozen of CH340C at less than 50¢ apiece ... if they work, you will have saved me a couple thousand bucks in my next project.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,748
I did not check what is MCP2221A. I had wrongly assumed that it was an MCU with USB onboard.
For USB-to-UART bridge, there is also FTDI FT230XS.
I've worked with FTDI products in the past. They're vey high quality and sturdy and reliable. But also very expen$ive ...
 

Jon Chandler

Joined Jun 12, 2008
1,571
Here's the CH340 circuit I have used many times. I'm sure it will work great for you.

Remember, if you use a USB C connector, it needs resistors on the CC lines to work when plugged into a USB-C port. No resistors = no power when connected with a USB-C - USB-C cable.....

CH340 Circuit.png
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,748
Here's the CH340 circuit I have used many times. I'm sure it will work great for you.

Remember, if you use a USB C connector, it needs resistors on the CC lines to work when plugged into a USB-C port. No resistors = no power when connected with a USB-C - USB-C cable.....

View attachment 342705
According to the datasheet, the CH340C does not need an external crystal nor caps (other than the standard decouplers). And yes, I'm aware of the USB-C quirks. Thanks for the heads up anyway.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,748
Just make sure they are real. The fakes are out there.
Only one way to find out ... :confused: ... that's why I only spent less than ten bucks for the test ... OTH, if they work, there's no guarantee that the next batch will be authentic too ... I hate that ...
 
Top