Author Topic: USB to Serial TTL  (Read 12729 times)

cbowen12345

  • Member
  • ***
  • Posts: 9
USB to Serial TTL
« on: February 25, 2011, 06:08:06 pm »
Last year I took an electronic device that was connected to a computer via a Dongle that sent information from the board via Serial TTL to  a USBdongle.  The dongle contained the VID/PID id and converted the device Serial TTL output to USB via a Maxim chip. We cut the cable carrying the serial data and via a radio sent the information to a 2nd radio and then connected the Serial TTL side of the dongle .  The dongle was plugged in and like http://magic,http:// the device wireless.  Works well and can be updated without taking the computer to the device.   

 NOW I have another electronics board I want to do the same thing with except that it has a EZUSB chip on board  the electronics device.  This is my approach so far.

I have connected an FTDI USB to SERial TTL cable to the isolated the communications lines (TX and RX) of the microprocessor that go to the EZUSB chipo.  I have set the FTDI USB cable to the correct VID/PID id (confirmed by checking device id) and tried to communicate with the device.  When the cable is connected to the electronic device and the USB cable is inserted, using either XP or Vista, the computer recognizes the device and tries to load the correct driver (fails 50% of the time).  Even when the driver loads I cannot connect to the device (software says "cannot wakeup device" (i have the usb wakeup enabled in the FTDI setup))

Finally, my questions:

     1.  Am i crazy for thinking I could get this to work?
     2. What obvious things am I missing here? 
            ( I have modified the ini files of the software that drives the device to include the drivers for the FTDI chip )
     3.  Could it be the connection speed of the micro-controller and the usb-serial are not correct? (i am running the connection speed of the FTDI cable at 119K but how do i determine the comm speed of a microprocessor (ie clock speed, based upon crystal used)  I'm obviously not an hardware engineer)

Thanks for any help at all. 

R Bowen

     

cbowen12345

  • Member
  • ***
  • Posts: 9
Re: USB to Serial TTL
« Reply #1 on: February 25, 2011, 06:17:20 pm »
The microprocessor in question is a Rabbit 2000 chip

Thanks


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2596
    • Lakeview Research
Re: USB to Serial TTL
« Reply #2 on: February 25, 2011, 06:50:24 pm »
Connect the FTDI converter to a USB port on the PC. Don't connect the serial port end to anything. Does the converter appear as a new COM port on the PC?

Jan

cbowen12345

  • Member
  • ***
  • Posts: 9
Re: USB to Serial TTL
« Reply #3 on: February 25, 2011, 06:58:31 pm »
When the cable is plugged into the computer with the serial end attached to nothing, the driver (for the software) loads and the device is now listed under USB controllers as the "XXX USB Loader"

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2596
    • Lakeview Research
Re: USB to Serial TTL
« Reply #4 on: February 25, 2011, 08:39:26 pm »
If it doesn't appear as a COM port (Device Manager > Ports), it's not a USB/serial converter. Or it is a USB/serial converter, but you have an INF file that is mis-identifying it.

Jan

cbowen12345

  • Member
  • ***
  • Posts: 9
Re: USB to Serial TTL
« Reply #5 on: February 26, 2011, 11:31:23 am »
Thanks for the reply.  Under Device Manager, the cable appears under the "other devices" and list itself as a "USB Serial Port".  There is a yellow (!) mark preceding the text "USB Serial Port".   I'm going to look at all the inf files associated with the cable or program. 

R B

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2596
    • Lakeview Research
Re: USB to Serial TTL
« Reply #6 on: February 26, 2011, 02:19:09 pm »
Device Manager shows the assigned drivers. My FTDI converter uses:

ftser2k.sys
serenum.sys
ftcserco.dll
ftserui2.dll

Search your INF files for the device's Vendor ID and Product ID.

View the setupapilog file to find out what Windows does on attachment.

Jan

cbowen12345

  • Member
  • ***
  • Posts: 9
Re: USB to Serial TTL
« Reply #7 on: February 26, 2011, 02:46:33 pm »
After deleting the two main programs, clearing all ini,inf and dll files, then reinstalling the MProg program, I have returned the "USB to Serial cable" back to its initial settings.  It now appears in the Device Manager under "Ports" as a "USB Serial Port (Com 11)".  No yellow ! appears next to the icon.

RB

cbowen12345

  • Member
  • ***
  • Posts: 9
Re: USB to Serial TTL
« Reply #8 on: February 26, 2011, 02:51:19 pm »
Using Mprog (from FTDI) I have reset the Vid/Pid ID to the same as on the Device.  When I open Device Manager, I can see under "Ports"  USB Serial Com.  If I look under Device Details, I can see the hardware ID  "FTDIBUS\COMPORT&VID_XXXX&PID_XXXX"

RB

cbowen12345

  • Member
  • ***
  • Posts: 9
Re: USB to Serial TTL
« Reply #9 on: February 28, 2011, 02:52:28 pm »
Jan,

The following files are listed  and the location:
ftser2k.sys     c:\windows\system32
serenum.sys     c:\windows\system32\drivers
ftcserco.dll    c:\windows\system32
ftserui2.dll     c:\windows\system32

I have connected my cable (usb <==> serial (TTL) to the comms RX and TX lines of the Rabbit Chip as it goes to the EZ-USB chip.  The cable has be programmed to have the vid/pid id of the end device.   I have tried to communicate  and have selected every level of COM speed from Highest to lowest (400K) without success.

Suggestions on what I must be missing?  I do make certain that the device still communicates thru the USB cable before and after each comm change to make certain the device has not locked up without success.


Thanks again for your help.  It is greatly appreciated.

R Bowen

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2596
    • Lakeview Research
Re: USB to Serial TTL
« Reply #10 on: February 28, 2011, 05:40:27 pm »
The drivers look correct.

Be sure neither end is using flow control or both ends are supporting the same flow control method.

Be sure each TX connects to an RX.

I'm not clear where the EZ-USB fits in. Are you connecting the FTDI converter's serial interface to a serial port on the Rabbit? What is the function of the EZ-USB?

Jan

cbowen12345

  • Member
  • ***
  • Posts: 9
Re: USB to Serial TTL
« Reply #11 on: February 28, 2011, 06:04:20 pm »
I am placing the FDTI converter serial interface on the RX/TX lines of the Rabbit chip.

Function of the EZ-USB chip
The electronic device has a usb port that is normally used to connect with a PC to upload and download data.  The USB port on the electronic device uses an EZ-USB chip to convert the Rabbit 2000 serial data for USB i/o.

 I am intercepting the information from the Rabbit 2000 Chip (pin PC4/5- rx and tx) prior to its arrival at the EZ-USB Chip.

R

cbowen12345

  • Member
  • ***
  • Posts: 9
Re: USB to Serial TTL
« Reply #12 on: March 01, 2011, 09:08:10 pm »
Jan,
I'm going to put a logic probe on the rx and tx pins in the next few days. I know that other issues are possible, like an inverted signal or the rabbit chip may be doing something unexpected with the data.  It may also help me diagnose my own stupidity.  
R
« Last Edit: March 02, 2011, 12:15:18 pm by cbowen12345 »