A chip that converts TTL level UART to RS232, USB, and CAN ? - Page 1
Forum section: electronics / projects

author: JoeMISCO
author_rank: Newbie
timestamp: June 03, 2010, 01:25:49 pm
content: We're working on an instrument that outputs a text string and we need multiple output options. The micro outputs a TTL string and we already have TTL to RS-232 chip and we would really love to replace it with one that has RS-232, USB, and CAN.If anyone has any ideas or has done something similar, any suggestions will be appreciated. The main problem is that the board is tiny and there is not much real estate left on it.I watch the blog quite often (my boss always busts me, but I tell him it's educational and will help my overall productivity from the knowledge I gain) I figure if anyone can help with this, it's Dave Jones and his boys on the forum.

author: tecman
author_rank: Frequent Contributor
timestamp: June 03, 2010, 03:19:44 pm
content: Unfortunately both USB and CAN are more than just a simple conversion as RS-232 is. USB is a master-slave communications with a lot of data passed concerning setup and communications. A simple setup (relatively) could be done with a micro that has embedded USP (look at PICs). All of the associated handshake comm would be handled by the micro. But you need some code to do this.CAN is even more interesting, IMO. There are quite a few standard CAN protocols. So first is to pick one. Then you again need quite a bit of handshake comm. CAN can be master-slave or peer-to-peer. That is a function of the protocol used. Again a micro is needed to handle this. PIC has quite a few micros with embedded CAN, so only a CAN hardware interface chip is needed, but again it would be a code writing project.Sounds like a good project for you.Paul

author: charliex
author_rank: Frequent Contributor
timestamp: June 03, 2010, 03:43:34 pm
content: Its pretty straightforward hardware wise. There are a few chips around with CAN, USB and UART, you can go the simple route for USB and use a serial<>USB converter like the FT232.An AT90CAN with an MCP2551 CAN transceiver is what i had been using, but i honestly couldn't recommend that MCU since its really hard to source. It has some good example code to get you up and going in CAN.After looking for a replacements I went for the ARM, intially the 2368 but with a recommendation from another poster on the forum, I'm looking at the LPC1768http://www.nxp.com/documents/data_sheet/LPC1768_66_65_64.pdfwhich pretty much has everything you're looking at. They have some example code, not as much as Atmel, but enough to get you going.Implementing USB isn't a walk in the park, people do struggle with it, but HID is easier, but easiest is the FT232, since it just appears as a serial port.

author: saturation
author_rank: Super Contributor
timestamp: June 03, 2010, 03:52:39 pm
content: Adding my 2c to tecman's input, I recall USB inevitably needs USB-IF certification to insure compatibility with USB standards, and thereafter, use the USB logo with a product [if this is the end goal.]To save developer trouble, there are pre-made converters, turning USB to CAN. You can easily find separate converters to turn RS-232 to USB.http://www.canusb.com/products.htmhttp://www.usbgear.com/usbg-232mini.html

author: charliex
author_rank: Frequent Contributor
timestamp: June 03, 2010, 04:02:39 pm
content: I don't think those devices are actually USB logo certified, so you're in the same boat if you want to go that route. Which is an expensive one, like 30K. They're basically the same hardware as i mentioned, just the FT245 and philips SJA1000+82251 with an AVR. the at90can+mcp2551+ft232/245 is much simpler hardware.

author: NiHaoMike
author_rank: Super Contributor
timestamp: June 04, 2010, 01:37:36 am
content: Quote from: JoeMISCO on June 03, 2010, 01:25:49 pmThere are plenty of chips that take RS-232 and convert it to USB (emulate a serial port). FTDI and Prolific are the ones I recommend. (I use those a lot for work on various embedded systems, mostly OpenWRT routers.) CAN is a little harder as you'll need to change the format of the data. You could add some code to your existing microcontroller to output CAN-formatted data for a CAN transciever, or you could add another microcontroller just for CAN.