High speed communication with PC

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Everyone,

I need to send data from a micro controller to the PC at very high rates in the range of 2 to 4 mega baud rates.
It would be really great if I can achieve such speeds with two way communication between micro controller and PC.
I would like someone to suggest me which micro controller will let me achieve such speeds and a development board associated with the micro controller.

Thanks in advance.

-Anil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Would 1M be OK. Most mega's can do 1MHz when being clocked at 16MHz. Of course once the bytes are inside the AVR there's a question of exactly what you can achieve when they are arriving at that rate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Thanks for your reply.
My application just needs to receive data from an analog sensor and send that data to the PC application software. But, for me I need to perform all these tasks such that I should achieve a baud rate more than 2 MHz.

Any example program or the communication protocol needed to achieve such speeds like USB, serial or SPI (which one of them can achieve such speeds) would help.

-Anil.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you considered compression to reduce the data amount?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can easily push that much over USB with an AVR by emulating a CDC device (serial port).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a healthy scepticism. How many ADC chips can read analog sensors at a million times a second?
The AVR's ADC certainly can't.

Most real life temperature sensors etc are hardly going to change that fast. Of course, things like music sampling do need high data rates. Other devices are better 'compressed'.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using XMEGAs over an FTDI 2232H USART to USB converter I have been able to get about 4.8 MBaud of analog sensor data to a computer with a little overclocking. Even without overclocking, you can technically get 4 MBaud out of an XMEGA serial port. It's mostly just a matter of getting the data to the USART quickly enough, which is greatly simplified by the DMA on XMEGAs.

For an evaluation board, based on the specs (I don't own one) the XMEGA-A3BU Xplained (http://store.atmel.com/PartDetail.aspx?q=p:10500293;c:100113) seems like a good starting point. It has USB on chip if you want to try that route, an ADC (presumably the latest hardware revision that actually works, but you might want to check), and of course lots of serial ports. Link to the device page for the A3BU: http://www.atmel.com/devices/ATXMEGA256A3BU.aspx?tab=overview. However, any AnU series device should be able to do want you want, where n is 1, 3, or 4.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Thank you all for your replies.

@hardmanko, I will follow what you suggested and will post here if I face any problems.

One question though, What is the clock speed you used to achieve 4.8 MBaud.

Regards,
Anil.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Another question is Are you using synchronous or asynchronous serial communication?
I am having problems receiving same number of bytes in each second with asynchronous communication.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not a USB expert, but...

How big is each data packet?

How many bytes do the various one second intervals differ by?

Depending upon the USB mode used one might expect the PC to grab a new data packet at once per mSec. Hence the "jitter" in a one second interval will be up to one packet.

Maybe.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,

Can anyone suggest me how to use synchronous USART or SPI in conjunction with a PC?
Like what kind of interface I need.

Regards,
Anil Palaparthi.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Like what kind of interface I need.

Well PCs simply don't have those kind of interfaces. They do have USB so any sync-UART or SPI is likely to just be another micro making a USB to USART/SPI bridge - so you won't really gain much as the data still ends up passing over USB (though admittedly it may be 480MHz not 12MHz USB).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
One question though, What is the clock speed you used to achieve 4.8 MBaud.

The clock rate I use is 48 MHz and set the USART to work at 6 MBaud, which is a very convenient division of 48 MHz. Due to various inefficiencies, the actual data transmission rate is ~4.8 MBaud.

Quote:
Another question is Are you using synchronous or asynchronous serial communication?

I'm using asynchronous. I also have an apparent problem with receiving the same amount of data each second, but it's really due to how I benchmark combined with the USB serial driver using quite large data packets (~64KB). I don't believe I have any real problem, it's just that each packet takes a significant fraction of a second to fill and the number of packets in a given second can vary by a little, but throw off my number of bytes a lot.