USB to RS 232

Discussion in 'Hardware' started by nigelleg, 28 May 2008.

  1. nigelleg

    nigelleg What's a Dremel?

    Joined:
    4 Jan 2008
    Posts:
    223
    Likes Received:
    1
    I just bought a UPS it has the ability to run nice monitoring software etc but the conn is a RS 232

    My board as is the norm lately has no com ports

    I ordered an adapter cable to go from com to USB

    Got it working fine so now have all the benefits of the software package

    The thing I wanted to know is whats involved in this adaption

    The adapter cable is not just a straight cable it has some sort of converter in it

    Once plugged in it need's drivers to make it work

    Is this all just to fool the system into thinking its a com port ?

    just wondering the technicalities behind this as it's clearly more than just a "plug" swop

    cheers
     
  2. Reverend_Jones

    Reverend_Jones Morte Nunquam Reget

    Joined:
    28 May 2008
    Posts:
    16
    Likes Received:
    0
    They would be using a chip (like the FT232R ) to convert the data from RS232 to USB.

    Yes, the driver emulates a standard PC serial port.
     
  3. Splynncryth

    Splynncryth 0x665E3FF6,0x46CC,...

    Joined:
    31 Dec 2002
    Posts:
    1,510
    Likes Received:
    18
    I would not say it is fooling the OS, or even call it emulation, but if you aren't concerned with what's going on in the OS, then "it fools the OS is good enough :)

    Here is a little more technical explaination from what I understand about Windows drivers.
    It's about hardware abstraction and APIs. Basically, there is an object (using the term object int eh programming sense) that has a type matching one of the possible types Microsoft defined when creating the OS. An object of that type is required to have certain things according to that same specification. Typically, these will be things like a data section, and member functions. The calling convention and arguments for these member functions are also laied out in the spec so using the object to talk to a serial port at 0x3F8 is the same as talking to a 'serial port' behind a USB controller. It is up to the driver to actually implement the driver and push the bits around (which may involve using other drivers).
     
  4. OnyxLilninja

    OnyxLilninja What's a Dremel?

    Joined:
    5 Feb 2008
    Posts:
    83
    Likes Received:
    0
    another note... usb to serial converters can have problems providing enough power to drive the serial line. A genuine serial port in the back of your computer would be more reliable (as many embedded developers have found out)
     
  5. mm vr

    mm vr The cheesecake is a lie

    Joined:
    18 Nov 2007
    Posts:
    2,968
    Likes Received:
    84
    He hasn't got one!

     
  6. capnPedro

    capnPedro Hacker. Maker. Engineer.

    Joined:
    11 Apr 2007
    Posts:
    4,381
    Likes Received:
    241
    Normally they will still have a pin header though, and can be added with a backplate. Or a PCI card.
     
  7. wyx087

    wyx087 Homeworld 3 is happening!!

    Joined:
    15 Aug 2007
    Posts:
    11,299
    Likes Received:
    426
    almost all modern motherboards don't have them anymore.

    i have got one, really useful if some hardware programmer needs it, but to be honest, most embedded programmers are now USB.
     
  8. Splynncryth

    Splynncryth 0x665E3FF6,0x46CC,...

    Joined:
    31 Dec 2002
    Posts:
    1,510
    Likes Received:
    18
    A lot of boards I have seen have a UART buried somewhere in the the hardware, but OEM's usually don't choose to break them out and disable them in the production BIOS.
    If the board has a super IO chip, then it probably has serial ports, but there are chipsets with UARTs built in as it really helps in debugging the board during development.

    But a number of factors usually means they are cut for the production boards.
    Where it really ends up being a problem is with laptops. Serial ports are still common enough in embedded development that not having one is a real pain, and limited expansion options on a laptop means adding one may not be possible other than through USB.
     
  9. nigelleg

    nigelleg What's a Dremel?

    Joined:
    4 Jan 2008
    Posts:
    223
    Likes Received:
    1
    Its doing the job fine ... sorry to change the subject its quite interesting to see the variations in the power supply wher I live compared to where i work

    We have alot of electricity problems in SA my area is esp bad for either power cuts or dropping of a phase

    At one time yesterday (around 18-30 which is about peak demand here) was only getting 198 V into the ups for a short time later in evening was getting 218 to 220

    getting 209 V now

    I was getting a constant 219 to 222 where I work (less than 25 kms away)all day long (running same ups and software at work ) waiting for a power cut to see how stable our generator voltage is

    Dont know how accurate this software/ups interface is ...also I wonder what a PSU needs to run stable my whole system was stable and running fine on the 198V

    How stable is your power supply where you guys stay ?
     

Share This Page