Serial to USB cable - varying results


Closed Thread
Results 1 to 15 of 15
  1. #1
    Join Date
    Nov 2006
    Posts
    70

    Default Serial to USB cable - varying results

    I would like to use a Serial to USB cable to communicate with a PiC16F688 which is running through an RS232 type level converter (actually an ICL2323). If I do straight serial communication with a com port on an older PC, everything works fine all the time. I can also communicate with a palm pilot, no problem. So I've established that straight serial works fine. But when I try serial to USB cables, the results vary from device to device. My first attempts failed utterly--I only got some periodic gibberish on the PC. A colleauge working with the same PIC-driven device also failed to establish communication, but then she tried a different (newer) PC and got it to work. I'm at a loss to see why there should be these discrepancies--serial to usb ought to be pretty simple right? Anyway, I was wondering if you had any insights because I have several people who will be using these devices, and I need to be able to recommend communication setups that work.

    One possible clue is flow control. I tried setting up serial communication between a palm pilot and the PC using the serial to USB cable, and I could not get it to work until I messed around with the flow controls. Flow control is not necessary when doing straight serial communication between the same palm and PC.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The converters I find most reliable are
    U209-000-R from Tripp Lite. They seem to be pretty close to RS232.
    Belkins are not reliable, does not have the voltage swing needed by some things.
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default end to end delays in USB/RS232 adapters

    Bootloaders seem very time sensitive to the variable delays when using USB to RS232 converters. Colleagues and I have tried at least half a dozen different looking adapters with netbooks, laptops notebooks and desk PCs. NONE gave 100% reliable results. Some mostly work, some never work. They are all Chinese and are generally fine for dumb ASCII communications but whenever accurate timing between sending a character and getting a reply is needed then it's back to an old PC with dedicated RS-232 DB9 connectors.

    It was my design practice to always fit an RS-232/TTL port to every design and use the MCSP bootloader for field bugfixes. I have abandoned that now and use the MeLabs U2 USB programmer for all code programming and updates. I have requested Mecanique to have a look at relaxing the timing on the MCSP bootloader but that message sank without trace.

    HTH
    Brian

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    brid0030, I only use the products from FTDI and have had no issues using them with bootloaders or normal programming serial communications. We deal with lot's of different inferfaces here at work and the FTDI seems to be one of the best I have found. The bootloading seems to be a bit slower but never fails....

    Dave Purola,
    N8NTA

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    MCLoader does have some issues - especially with USB-serial. I made it work much better by disassembling it, adding a 16 bit delay after the 1st jump vector and before the loader actually started executing and then re-assembling it. I now have something that works all the time. I use only a two-wire connection (I don't control MCLR). It still loads slowly, but at least it always gets started when I turn power on.
    Charles Linquist

  6. #6
    Join Date
    Nov 2006
    Posts
    70


    Did you find this post helpful? Yes | No

    Default cables ordered

    Well, I'm not attempting bootloading, just serin and serout. I'm just gonna buy a few cables and see what works. The option I will put forth to users first is to get a PC card with a com port....or just dust off that old laptop from 6 years ago.

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    As long as you are not attempting to bootload, then I think you will have no trouble. I have at least 4 brands of serial-USB adaptors, and all work fine. After you install, you may have to open up Windows Device Manager and go into the driver/properties tab in order to change the com port assigned to the device. I had one that installed itself as Com 12!
    Charles Linquist

  8. #8
    Join Date
    Nov 2006
    Posts
    70


    Did you find this post helpful? Yes | No

    Default Not everything works

    Hey Charles. Thanks, but I don't think it is that simple. I have a 'no name' serial to USB cable that works with other devices, but not with the PIC/MAX232 setup. One of my collaborators reported that there was no readable communication using a radio shack cable and a compaq presario, but she got it to work with the same cable and a newer vista computer. So I don't think all cables and computers are created equal when it comes to serial to usb. I'll post what I learn when I get cables in the mail.

  9. #9
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Maybe you found a bad one. I made a loopback tester that just connects pins 2 & 3. I plug it in, and press a key. If I see an echo, I have the right COM port selected, and it is working.

    One thing: I never use any form of hardware handshaking.
    Charles Linquist

  10. #10
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Another thing to bear in mind is that if you plug the USB Serial Adapter into a different USB Port (either on the PC or a hub) it will get "reinstalled" as a completely different serial port hence the high com Port numbers some people get upto.

    You also cant uninstall a USB Serial port if it isnt physcially connected but you can steal the Com Port number that it was occupying in Device Mangler
    Keith

    www.diyha.co.uk
    www.kat5.tv

  11. #11
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    I do it a bit differently and so I am able to connect even the lowliest 8-pin 12F683 project to USB for a modest $2.68 investment (plus the cost of connectors).

    I use a 'clone' Nokia CA-42 cell phone cable (USB to TTL level serial) available from one of several different Chinese vendors on eBay which uses the Prolific PL-2303 IC instead of an FTDI IC. Here's one of the vendors I use; Nokia CA-42 + CD, $2.68



    I cut off the connector on the cell phone end of the cable and replace it with a 3.5mm "stereo" plug. I wire up the WHT (phone Tx), GRN (phone Rx), and BLK (ground) wires. I put a matching 3.5mm "stereo" jack on my PIC project boards and I'm in business (no MAX232 or equivalent level shifter IC required). Please note that there is no 5v wire in the cable (bummer!).

    I've been using a 3.5mm "serial port" jack on my project boards for years (to save space) along with a simple two transistor RS232-to-serial adapter cable. Now I have the luxury of using those project boards with the RS232-to-serial adapter cable or the new USB-to-serial adapter cable.



    The image above is of a successful serial bootloader download using my CA-42 USB-to-Serial cable.

    Regards, Mike, K8LH
    Last edited by Mike, K8LH; - 19th April 2010 at 18:05.

  12. #12
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Great tip Mike.

    Looked a bargain at $2-68 then I discovered it INCLUDED shipping !!!!

    Got 2 on the way to me now
    Keith

    www.diyha.co.uk
    www.kat5.tv

  13. #13
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Mike, K8LH View Post
    I cut off the connector on the cell phone end of the cable and replace it with a 3.5mm "stereo" plug. I wire up the WHT (phone Tx), GRN (phone Rx), and BLK (ground) wires. I put a matching 3.5mm "stereo" jack on my PIC project boards and I'm in business (no MAX232 or equivalent level shifter IC required). Please note that there is no 5v wire in the cable (bummer!).

    Regards, Mike, K8LH
    Do you know if perhaps other signals are available on this cable - in particular RTS and CTS? Thanks.

  14. #14
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Well, it's kind of a "good news" and "bad news" situation, I'm afraid...

    The PL-2303 circuit board on the "business end" of the cable includes pads for 3.3v (<50ma), 5v (<100ma), RTS, CTS, etc. but since the cable is molded you have to cut away the blue plastic molding and the black rubber potting underneath to access to the circuit board. Here's what you end up with;



    It seems that each new generation of clone cables are cheaper then the last. If you check out the original Jonathan Thomson article that caught my attention you'll find that earlier versions of the cable had a removable shell at the USB end and had more wires to work with and so that's kind of a bummer(!).

    Regards, Mike
    Last edited by Mike, K8LH; - 19th April 2010 at 20:23.

  15. #15
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Thanks for the info and the link.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts