The folks at Openschemes.com have written up an article on how to convert a USB serial port adapter to a low voltage serial interface for interfacing with microcontrollers. Though you can always just buy one, this is a fairly quick and cheap solution, especially if you are in a pinch or don’t have access to a retailer. The specific models you should watch for, are the ones with two chips, a microcontroller and a line translater.They go through the process of finding exactly where to patch in to add an extra interface. It only takes a couple wires and you are ready to go.
Not only can you use this as your serial connection to another microcontroller, but you can actually take control of the one on the board itself. If you load it with the drivers from TI, you gain access to the flash memory and can do whatever you want. They don’t go into much detail here though, stating that they’ll write another article on that.
We thought this little bugger looked familiar so we went digging through our archives. Sure enough, we found this system in action back in January of 2008.
[via Hacked Gadgets]
“are the two chip ones.”
LOL
@3riX,
Good eye, I meant to change that. The link was incorrect too. It is all fixed.
The context of that sentence was a bit hard to interpret.
I wasn’t sure if it meant models “that contain two chips” or “two models that contain chips”.
Wouldn’t it have been easier just to say IC?
Click on through to the article. It should clear up any confusion.
I’m surprised at how many people still refer to DE9 ports as DB9. ;-) Interesting article, though I think I’d find more use of the other end – using the USB controller to add rudimentary USB support to a low-end microcontroller that only supports serial (bit-banged or UART).
This is a great way to interfce to a gphone too: FTDI chips are either 5V or 3.3v in the first case you need a voltage divider on the output (AKA two resistors) in the other you can just use it straight thru.
@Ben: I guess the misnomer just stuck. IIRC a DB9 connector would be the same size as a DB25 connector but with 9 pins :)
If you are looking for a cheap USBRS232 adapter have a look at http://www.dealextreme.com/details.dx/sku.24512
The controller used is a Prolific PL2303HX in combination with a MAX211CAI level shifter (thats what they say on the DX forum). The datasheets can be downloaded from the manufacturers websites and there are appnotes for the PL2303 on the net.
That way you get an USB controller and level-shifter for just 2,99 $ in a simple to open package.
Ordered mine today…
BTW: they even have pictures of the board:
http://i28.tinypic.com/10dco52.jpg
http://i32.tinypic.com/eq724z.jpg
I wrote an article about this kind of thing last October. The very high-res pictures may help people trying to do the same thing.
http://rdist.root.org/2008/10/29/diy-usb-to-ttl-serial-adapter/
It is much easier and cheaper to take a usb data cable for a mobile phone, e.g. nokia ca-42 (compatible replacements dirt cheap on ebay)
Well I want to point out that +-12V problem dont really exist, I newer had a problem connecting uC directly to serial port thought resistor (22k for uC input 1k for uC output) even on high baud rate you can call me cheap but it works (at least for PIC’s, I didn’t try this on AVR yet)
therian, that worked for you because you’re sinking the excess voltage through the ESD diodes in your uC via the resistor. It limits the current.
However, I have had 3.3v parts (an FPGA) zapped by that approach, even with a large enough resistor. You really should use a level shifter when working with less robust parts.
Whoopie! ?!?!
i wrote also a small howto use a mobile phone cable as a ttl – usb convertor: http://www.neophob.com/serendipity/index.php?/archives/120-TTL-to-Serial-for-dummies-OpenWRT-Serial-Console.html
@foerdi:
i second that. i got some from dx with a pl2303hx on one side and an intersil hin211ca instead of the maxim on the other side of the board. so, they should work.
another useful hack is to obtain an old nokia usb data cable. these often use a similar chipset.