Serial Communication Baud rate 1140

Hi, im working on an arduino projekt and have a question to baud rates. Im tryring to receive data with a baud rate of 1140 . How can i programm this? I read on the interent site, that an arduino uno is supported to baud rates 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 31250, 38400, 57600, and 115200.

Im sr about uncorrect sentences and hope you can help me.

The Arduino will receive and transmit at or close to just about any reasonable bit rate you ask it to.
Your PC however will not be so accommodating

Correct, the arduino will perform the calculations needed to generate any arbitrary baudrate between some finite minimum and maximum value. However not all things you wire to the arduino serial may be able to also do that and may be limited to a series of 'standard' baudrates. For example the serial monitor in the arduino IDE only works on some predefined baudrates.

Thank you first for your quick answers. Its a silly question , but do you have any coding examples to realize a receiving data with a different baudrate? I have watched to many examples that i'm a bit confused. Its a connection with an extern serial system that works with 1140 .

By the way , i came from Germany and sr about my bad school english. :)

LLGO: Its a connection with an extern serial system that works with 1140 .

What are you going to do with the data sent/received over this connection? For example, does the Arduino also need a serial connection up to the PC so that you can see what it's doing? If so, that is important since you now need two separate serial ports.

Yes, the one thing i want to do is to receive the data as an input that comes with (1140 baud) and to see the received Data(ascii) on the PC (for example with 1200 baud ). (Debug)

Have you looked at the SoftwareSerial library? I'd run the debug output at a much higher rate than 1200, because you're probably going to want to print much more than you receive.

Yes i did, but im not sure if this will be work .
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(57600);

mySerial.begin(1140);

}
Its an Project, that i want to realize with arduino , but now i didnt have a board, yet and looking for the right one.

Either use SoftwareSerial, or get a board with multiple hardware serial UARTs.

Don't use SoftwareSerial if you need to send over your 1140 buad port as well as receive, because SoftwareSerial is not very good at sending.

So its a bad solution to devolop this with SoftwareSerial? I have to receive only.

For example: an arduino uno with UART Pins 0 (RX) und 1 (TX)

void setup() { // initialize both serial ports: Serial.begin(9600); Serial1.begin(1140) // Are the Pins 0 , 1 }

I hope i unterstand it right. Thx first for all the Informations

An Uno doesn’t have Serial1

Check - http://forum.arduino.cc/index.php?topic=138497.0 - for software serial in almost any baud rate.

First thank you all for your Help, i think the Arduino community ist the best. To help each other, no matter where they come.
Second , i solved the problem with Hardware serial . Its a projekt for my Bachelor exam. Its an hardware for a train station in Hamburg.

LLGO: By the way , i came from Germany and sr about my bad school english. :)

If that is bad then you should have no trouble at all.

The Arduino site has many pages worth bookmarking. Here is the official libraries and software serial page: http://arduino.cc/en/Reference/Libraries http://arduino.cc/en/Reference/SoftwareSerial

What Arduino to get? One that you can use to program stand-alone AVR chips for projects and test code with! Arduino is a development board. You will also want a breadboard, jumpers and other bits. One Arduino can let you build many projects while keeping the Arduino itself.

The UNO is one good choice because it has a low-cost medium ability chip in socket, you can change the chip on the board for another with bootloader burned in (can buy pre-loaded, maybe 2 or 3 Eu) and program that right on the board then take it off and plug it in elsewhere.

But buy at least ONE genuine (not super-cheap clone) Arduino please, just to support the support you get!

This page shows how to build and program both 328P and 1284P (16K RAM, 2 hardware serial) 'duino's.

How to make an Arduino-compatible minimal board

http://www.gammon.com.au/forum/?id=11637

If you don't much at all there are smaller AVR's that IDE files are available for, down to 8-pin ATtiny chips.

I've used the next site when I still used bascom to get work with all "standard" baudrates with the smallest error-rate possible. I just entered 1140 baud and was surprised to see crystals with a 0% error-rate, perfectly match 1140baud.

WormFood's AVR Baud Rate Calculator

Next problem may be configuring arduino to work with such a crystal correctly (timers etc), something I still have little experience with.

Simpson_Jr: I've used the next site when I still used bascom to get work with all "standard" baudrates with the smallest error-rate possible. I just entered 1140 baud and was surprised to see crystals with a 0% error-rate, perfectly match 1140baud.

That may be just because 1140 is a relative low baud rate . A 0.0% error means less than 1 in 1000 ==> 1140 * 1000 = 1.1 MHz. As 8Mhz is quite a bit above that it is what one can expect. (cigar box calculation)

looking at the tables you see the higher the clock speed the more green in the table :)

If you clocked a bit every 876 or 880 micros (which round to the nearest 4) then you'd be off less than 1%.

1 sec / 1140 = 877.192... usecs

The serial pulse will be pretty wide in Arduino terms, you could read that without resorting to interrupts. Just remember: start bit, data bits, stop bit = 10 bits per data byte.

heck - you might want to make multiple reads per pulse just to filter noise!

LLGO: Hi, im working on an arduino projekt and have a question to baud rates. Im tryring to receive data with a baud rate of 1140 . How can i programm this? I read on the interent site, that an arduino uno is supported to baud rates 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 31250, 38400, 57600, and 115200.

Im sr about uncorrect sentences and hope you can help me.

The HardwareSerial code sets the Arduino to the closest possible baud rate (based on the integer divisor that gives the closest value).

You can use "Serial.begin (1140)", but the code will set the Arduino to the closest possible value, which in this case is 1200 baud.