Author Topic: A chip that converts TTL level UART to RS232, USB, and CAN ?  (Read 6366 times)

0 Members and 1 Guest are viewing this topic.

Offline JoeMISCOTopic starter

  • Newbie
  • Posts: 2
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.
 

Offline tecman

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: us
Re: A chip that converts TTL level UART to RS232, USB, and CAN ?
« Reply #1 on: June 03, 2010, 03:19:44 pm »
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
 

Offline charliex

  • Frequent Contributor
  • **
  • Posts: 342
  • Country: 00
  • Car Hacker
Re: A chip that converts TTL level UART to RS232, USB, and CAN ?
« Reply #2 on: June 03, 2010, 03:43:34 pm »
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 LPC1768 http://www.nxp.com/documents/data_sheet/LPC1768_66_65_64.pdf which 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.
 

Offline saturation

  • Super Contributor
  • ***
  • Posts: 4787
  • Country: us
  • Doveryai, no proveryai
    • NIST
Re: A chip that converts TTL level UART to RS232, USB, and CAN ?
« Reply #3 on: June 03, 2010, 03:52:39 pm »
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.htm

http://www.usbgear.com/usbg-232mini.html

Best Wishes,

 Saturation
 

Offline charliex

  • Frequent Contributor
  • **
  • Posts: 342
  • Country: 00
  • Car Hacker
Re: A chip that converts TTL level UART to RS232, USB, and CAN ?
« Reply #4 on: June 03, 2010, 04:02:39 pm »
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.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9157
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: A chip that converts TTL level UART to RS232, USB, and CAN ?
« Reply #5 on: June 04, 2010, 01:37:36 am »
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.
There 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.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf