Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12745 Discussions

Maximum Baud rate possible with RS-232

Altera_Forum
Honored Contributor II
3,773 Views

Hello, 

 

I want to use RS-232 interface for communication. I read the NIOS II processor reference which says one can set the baud rate by selecting the standard preset values (where the maximum specified value is 115.2 kbps) or manually to "any speed". 

 

I want to know can I set the baud rate to higher than 115.2 kbps speeds (since our application requires atleast 1Mbps baud rate). I am using NIOS II 50MHz processor. 

 

Sincerely, 

 

kvm.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
2,087 Views

Maybe, though you have to keep in mind that the UART controller basically has no buffering (in hardware), so the faster you run the more likely it will be that you lose data. 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
2,087 Views

Also to add to the last post, be carefully with the offchip signals as well. RS232 is not encoded to combat noise like most modern serial standards. I've seen in the past just the noise off a busy board cause 25% error rates and that was only running 56kbps. Imagine what will happen at 1Mbps and environment noise thrown on top of that.

0 Kudos
Altera_Forum
Honored Contributor II
2,087 Views

 

--- Quote Start ---  

originally posted by badomen@Jun 30 2006, 05:02 PM 

also to add to the last post, be carefully with the offchip signals as well.  rs232 is not encoded to combat noise like most modern serial standards.  i've seen in the past just the noise off a busy board cause 25% error rates and that was only running 56kbps.  imagine what will happen at 1mbps and environment noise thrown on top of that. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16587) 

--- quote end ---  

 

--- Quote End ---  

 

UARTs in SOPC Builder are configurable. You need to make the divisor register writeable in SOPC Builder and then you can initialize your UART to run at your desired rate. If you use properly shielded cables and other good EMI design practices you will have no worries with RS232. If error rates are a concern then packetize your data and do a CRC check on the packets.
0 Kudos
Altera_Forum
Honored Contributor II
2,087 Views

Hi, 

 

Take a look at http://www.opencores.org/projects.cgi/web/uart16550/overview (http://www.opencores.org/projects.cgi/web/uart16550/overview). 

 

This UART includes two 16byte FIFO memories (for Rx/Tx), you will have to make some modifications/optimizations to embed it into your NIOS-II system. 

 

We use this UART (verilog version) to communicate with a SIM/SAM module at >512kbps (the electrical interface is far away from being RS232 compatible).  

 

We also use it to communicate with a PC at 115,2kbps (using a MAX3232 compatible chip as we include two ports in the same connector). 115,2kbps is the higher speed I used (1,5M long 3-wire cable) for testing purposes since it is the highest speed that my PCMCIA can handle. At this speed no errors appeared due to signal degradation (no errors detected in programs, signal quality supervised using a 5GHz digital sampling scope). 

 

Once again, proper PCB layout is the key for high speed comms.
0 Kudos
Altera_Forum
Honored Contributor II
2,087 Views

I saw this post and have a question.  

 

Is it possible to run the UART at 12MB/s ? I put a 100MHz input clock and have manually set the Baude rate to 12000000 by adding to the set_parameter_property baud ALLOWED_RANGES within the _hw.tcl file, However I measured 10Mb/s ???
0 Kudos
Altera_Forum
Honored Contributor II
2,087 Views

Integer divider ratio required.

0 Kudos
Reply