Author Topic: Communication between computer and MCU  (Read 4112 times)

0 Members and 1 Guest are viewing this topic.

Offline YaroTopic starter

  • Contributor
  • Posts: 48
Communication between computer and MCU
« on: March 18, 2015, 02:27:49 pm »
Hi all,

I want to ask if there is another communication way between an MCU and a computer faster than RS232 with USB. I want to try to have a faster communication(over 115200baud) and if possible with something already done(or in part done).
 

Offline martijnb

  • Newbie
  • Posts: 1
Re: Communication between computer and MCU
« Reply #1 on: March 18, 2015, 02:39:20 pm »
According to this thread (http://www.avrfreaks.net/forum/what-maximum-baudrate-rs232), you should be able to reach your desired speed.

Otherwise, you could take a look at RS232's bigger brother, RS-422 or RS-485.
Wikipedia states that RS232 supports speeds from 100 kbit/s to 10 Mbit/s, which is plenty.
 

Offline ggchab

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: be
Re: Communication between computer and MCU
« Reply #2 on: March 18, 2015, 02:43:17 pm »
I am using a cheap RS-232 PCI board in my PC. That's a lot faster than RS-232 / USB adapter.
 

Offline katzohki

  • Frequent Contributor
  • **
  • Posts: 378
  • Country: us
    • My Blog
Re: Communication between computer and MCU
« Reply #3 on: March 18, 2015, 02:43:51 pm »
There are MCUs that support USB directly.
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Communication between computer and MCU
« Reply #4 on: March 18, 2015, 02:47:19 pm »
Why are you using RS232 with USB in the first place?

MCUs don't speak RS232, and modern computers all have USB, so what is RS232 doing in the mix at all?  FTDI makes plenty of USB to UART adapters that run up into the double digit Mbps, will that not work for you?

If it's a long distance run you're worried about, then go with something like 422 or 485 instead.
« Last Edit: March 18, 2015, 02:55:15 pm by suicidaleggroll »
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Communication between computer and MCU
« Reply #5 on: March 18, 2015, 10:51:40 pm »
Why are you using RS232 with USB in the first place?

MCUs don't speak RS232, and modern computers all have USB, so what is RS232 doing in the mix at all?  FTDI makes plenty of USB to UART adapters that run up into the double digit Mbps, will that not work for you?

If it's a long distance run you're worried about, then go with something like 422 or 485 instead.

I think generally people confuse serial comms with meaning RS232 comms.  And the FTDI chips have 232 in the name, even though they are just USB to serial chips intended to talk to the MCU's serial port.
 

Offline YaroTopic starter

  • Contributor
  • Posts: 48
Re: Communication between computer and MCU
« Reply #6 on: March 19, 2015, 10:42:46 am »
Maybe I didn't explain well. I've a board that have a usb communication limitation to 115200 baud in the firmware. What I want is an alternative method using GPIOs to send data to a PC. I know I can use USB, but use this standard without libraries and hardware support will be long to develop. I'm asking something, already done, that allow me to have faster communication with a PC.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: Communication between computer and MCU
« Reply #7 on: March 19, 2015, 10:50:39 am »
Maybe I didn't explain well. I've a board that have a usb communication limitation to 115200 baud in the firmware. What I want is an alternative method using GPIOs to send data to a PC. I know I can use USB, but use this standard without libraries and hardware support will be long to develop. I'm asking something, already done, that allow me to have faster communication with a PC.
Well unless you create your own proprietary communication interface to the PC your only off the shelf alternative would be to use IP.
Commercial readytogo IP modules often have the same lame serial interface, which is good but not fast as you would like.
So to do this cheap and quick I would use a raspberry pi, interface its GPIO with your microcontrollerboard (use a proprietary interface and protocol) and transmit/receive through tcp or udp (if package loss is acceptable) over IP.
« Last Edit: March 19, 2015, 11:47:38 am by Kjelt »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: nz
Re: Communication between computer and MCU
« Reply #8 on: March 19, 2015, 11:11:29 am »
FTDI's FT220X usb to spi IC can do 500kbits/s

http://www.ftdichip.com/Products/ICs/FT220X.html
« Last Edit: March 19, 2015, 11:13:08 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline katzohki

  • Frequent Contributor
  • **
  • Posts: 378
  • Country: us
    • My Blog
Re: Communication between computer and MCU
« Reply #9 on: March 19, 2015, 06:55:14 pm »
Maybe I didn't explain well. I've a board that have a usb communication limitation to 115200 baud in the firmware. What I want is an alternative method using GPIOs to send data to a PC. I know I can use USB, but use this standard without libraries and hardware support will be long to develop. I'm asking something, already done, that allow me to have faster communication with a PC.

There are devices that will support USB directly.

What do you need to send data so fast for?
 

Offline Rory

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: us
Re: Communication between computer and MCU
« Reply #10 on: March 19, 2015, 08:16:57 pm »
For USB virtual com ports, CP2102 will go to 1 Mbps.  FT2232D can do async serial or 8 bit parallel I/O which can be considerably faster.   
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf