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
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.
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).
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)
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.
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.
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 ?