Author Topic: using two CP2102 USB to UART chips simultaneously  (Read 7233 times)

0 Members and 2 Guests are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
using two CP2102 USB to UART chips simultaneously
« on: December 31, 2007, 08:45:46 AM »
I am having difficulties using two separate devices that each have a CP2102 chip to communicate through USB to my computer . . .

They each work fine alone . . . but when I plug in the second it asked me to install the drivers again. Ok so I did no problem. But the Device Manager still recognizes only one USB port and not both . . .

Ideas anyone? I'm thinking is a device driver bug . . .

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: using two CP2102 USB to UART chips simultaneously
« Reply #1 on: December 31, 2007, 09:58:15 AM »
so i'm guessing this is an issue with both chips having the same Serial Number.
have a read of the datasheet and see if it's possible to change the Serial Number if flash.

2 USB devices with the same Vendor ID, Product ID and Serial Number cannot exist on the same system.

if you can't get the CP2102 to work i have had good luck with the FTDI 2232L which has 2 UARTs built in.


dunk.

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: using two CP2102 USB to UART chips simultaneously
« Reply #2 on: December 31, 2007, 02:51:18 PM »
I've also had good luck plugging multiple FT232 chips in at the same time, both under Windows XP and on a gumstix/Linux.

- Jon

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: using two CP2102 USB to UART chips simultaneously
« Reply #3 on: December 31, 2007, 03:20:54 PM »
Quote
so i'm guessing this is an issue with both chips having the same Serial Number.
have a read of the datasheet and see if it's possible to change the Serial Number if flash.
ok I found this that explains how to do it:
http://www.silabs.com/public/documents/tpub_doc/anote/Microcontrollers/Interface/en/an144.pdf

and a whole bunch of other neat applications that others might find useful:
http://www.silabs.com/tgwWebApp/public/web_content/products/Microcontrollers/en/mcu_applications_appnotes.htm

section 4.1 shows the program to change stuff (see attached image). It has these below instructions. So basically, I can just enter in any random 63 character string and it will work???
Quote
To change one or more of the values, click on the checkbox to the left of the field and enter the new value. Once the new values have been entered, click on the "Program Device" button.
The values entered are subject to the following limitations:
4.Serial Number—any sequence of up to 63 characters.
5.Product String—any sequence of up to 126 characters.
Notes:
Avoid connecting more than one device containing the same VID, PID and serial number combination.
When the serial number of a CP210x device is changed and the device is reset by calling the Host API function CP210x_Reset(), the device will re-enumerate and the device driver will be installed.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: using two CP2102 USB to UART chips simultaneously
« Reply #4 on: December 31, 2007, 04:33:01 PM »
Ok I'm stuck.

So I enter in the last 63 digits of the serial number but I changed the last letter from e to f:
4&pid_ea60&mi_00#0001_00#{993f7832-6e2d-4a0f-b272-e2c78e74f93f}

There are definitely more than 63 digits in the current serial number (see previous attached image), so thats partly why Im confused . . .

Anyway, I push 'Program Device', a short 3 second wait occurs, then it stops. No errors or messages or anything. The serial number hasn't changed. A hardware reset doesn't change it either.

The instructions say:
Quote
When the serial number of a CP210x device is changed and the device is reset by calling the Host API function CP210x_Reset(), the device will re-enumerate and the device driver will be installed.
The 'CP210x_Reset()' is in the source code header file, so I am assuming its automatic with the program.

Thoughts?

Offline hgordon

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 373
  • Helpful? 7
    • Surveyor Robotics Journal
Re: using two CP2102 USB to UART chips simultaneously
« Reply #5 on: December 31, 2007, 06:36:40 PM »
The devices need to have unique serial numbers. You can use AN144 to change these numbers.

http://www.silabs.com/tgwWebApp/public/web_content/products/Microcontrollers/en/mcu_applications_appnotes.htm

I have used this before with the CP2102 and it works well.  However, when I run the program, all of the fields on (Vid, Pid, Max Power, Serial Number, Product String) are populated.  It's the Serial Number next to the Part Number that gets changed
« Last Edit: December 31, 2007, 06:44:27 PM by hgordon »
Surveyor Corporation
  www.surveyor.com

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: using two CP2102 USB to UART chips simultaneously
« Reply #6 on: February 06, 2008, 05:08:42 PM »
Just resolved this problem today.

The proper serial number was just a 4 digit number . . .

As default it was 0001, so I just changed it to 0004.

My PC then 'identified new hardware' and made me go through the driver selection process again, but after that it worked. :)

Finally getting the hang of this CP2102 . . .

Offline hgordon

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 373
  • Helpful? 7
    • Surveyor Robotics Journal
Re: using two CP2102 USB to UART chips simultaneously
« Reply #7 on: February 06, 2008, 05:54:25 PM »
I like the CP2102.  The 3.3V output is about double what you can get from FTDI.  My only issue was that they took WAY too long to bring out a Mac Intel driver, but the problem was finally resolved last spring.
Surveyor Corporation
  www.surveyor.com