Hi!
(sorry for my english)
I would like to build a serial ethernet converter with arduino mega boards. The problem is, the serial communication operating on a non standard baud rate and data bit length. (571430bit/s, 9bit, no parity, 1 stop bit)
(This is a sony camera controller btw)
I tried to set the baud rate, but arduino still working on the closest (500.000bit/s) speed.
There is a way to set arduino on a specific baud rate? Or there is any additional controller, that could help on my problem?
Thanks!
Can you give a link to that sony camera controller ?
Can you give a source for the 571430 baudrate for that controller ?
16 MHz / 28 = 571428.57
60 MHz / 105 = 571428.57
That is almost 571429 and not 571430.
That means any board that runs at 16 MHz or 60 MHz or multitude of that can make that baudrate (depending on a fixed prescaler). There are many Arduino boards, ESP boards and Teensy boards that run at those frequencies.
Wormfood calculator: http://ruemohr.org/~ircjunk/avr/baudcalc/avrbaudcalc-1.0.8.php
The Arduino Uno or Mega with 16 MHz turns red, so that is not possible. It would need a crystal of 18.2858 MHz, that is not a standard value.
The hardware can read 9 bits.
What is the 9th bit for ? What does it do ? Is it some kind of parity ?
Computer memory can store 8 bits, not 9 bits.
The 9th bit is the "start bit" for the sequence.
Paul
Assuming you are using an Atmega328P Arduino, the formula for generating the baud rate from a given CPU clock is given in the datasheet
So for a 16 MHz Arduino, changing the UBRR register to 1749 would give you the 571.43 bps
The Atmega328 also supports 9 bit data
We need to know if the dot in "571.430" is a separator or a decimal. We also need to know if that is really the baudrate.
An example of a Sony Camera Controller, the RM-IP500.
According to its Remote Camera System Guide the baudrate is either 9600 or 38400. That makes sense.
There is another camera controller with the same 9600 or 38400.
Koepel:
Can you give a link to that sony camera controller ?
Can you give a source for the 571430 baudrate for that controller ?16 MHz / 28 = 571428.57
60 MHz / 105 = 571428.57
That is almost 571429 and not 571430.That means any board that runs at 16 MHz or 60 MHz or multitude of that can make that baudrate (depending on a fixed prescaler). There are many Arduino boards, ESP boards and Teensy boards that run at those frequencies.
Wormfood calculator: http://ruemohr.org/~ircjunk/avr/baudcalc/avrbaudcalc-1.0.8.php
The Arduino Uno or Mega with 16 MHz turns red, so that is not possible. It would need a crystal of 18.2858 MHz, that is not a standard value.
The hardware can read 9 bits.What is the 9th bit for ? What does it do ? Is it some kind of parity ?
Computer memory can store 8 bits, not 9 bits.
Any professional sony broadcast camera and RCP communicate at this baud. The protocol is not documented on the internet, I calculated it with a logic analyzer.
Thank you, this page is very useful. As I see, the 18.432Mhz would work. If I understand correctly, an atmega328P (which could run even on 20Mhz) with an 18.432Mhz crystal would work with this baud rate. Am I correct?
The 9th bit is an adress bit, not a parity bit.
Koepel:
We need to know if the dot in "571.430" is a separator or a decimal. We also need to know if that is really the baudrate.An example of a Sony Camera Controller, the RM-IP500.
According to its Remote Camera System Guide the baudrate is either 9600 or 38400. That makes sense.
There is another camera controller with the same 9600 or 38400.
Sorry! It's 571430 bit/s, so a little more than half Mb/s. And yes, it is completley sure. I measured it with a logic analyzer too.
It seems that crystals with that frequency actually exist :o
You can also buy a Arduino (or compatible) board with a higher frequency. Almost every board is a multitude of 16 or 60 MHz.
Is that with 5V levels or 3.3V levels ?
Can you show us a screendump of the logic analyzer ?
The hardware of the ATmega328P can deal with 9th bits, but the Arduino Serial library can not. You have to write your own code. The ATmega328P has a hardware buffer of 1 byte. Your code will have trouble keeping up with that high baudrate. A faster board makes it easier.
But I don't know which board can also do 9-bits and can do that baudrate.
Koepel:
It seems that crystals with that frequency actually exist :o
You can also buy a Arduino (or compatible) board with a higher frequency. Almost every board is a multitude of 16 or 60 MHz.Is that with 5V levels or 3.3V levels ?
Can you show us a screendump of the logic analyzer ?
The hardware of the ATmega328P can deal with 9th bits, but the Arduino Serial library can not. You have to write your own code. The ATmega328P has a hardware buffer of 1 byte. Your code will have trouble keeping up with that high baudrate. A faster board makes it easier.
But I don't know which board can also do 9-bits and can do that baudrate.
It's a 5V signal. The communication between the two device is on RS422 protocol, but I converted it with a max490e ic.
Here is the screendump
Thank you.
The ESP32 should be able to set that baudrate, but it has only 5, 6, 7 or 8 databits: UART — ESP-IDF Programming Guide v3.1.7-73-g2060ee9a5 documentation.
The Arduino Zero and MKR boards have a SAMD21G processor. It can work with 9 bits. It is even defined in the low level SERCOM.h. I don't know if the baudrate is possible. It seems that the full 48MHz is used for the baudrate generator, then it is no problem.
The Arduino MKR is a 3.3V board, you would have to change the voltage level.
Why not try both ? The Arduino with the special crystal and a MKR board with SAMD21G processor.
P.S.: You don't have to quote my whole message. What I wrote is already there
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.