Go Down

Topic: SOLVED - Serial1.begin(57600) = 57.600 kHz ? (Read 1 time)previous topic - next topic

ted

May 17, 2018, 02:37 amLast Edit: May 18, 2018, 04:12 pm by ted
Code: [Select]
`//Leo_passthru// Allows Leonardo to pass serial data between // fingerprint reader and Windows.//// Red connects to +5V// Black connects to Ground// Green goes to Digital 0// White goes to Digital 1void setup() {  Serial1.begin(57600);  Serial.begin(57600);}void loop() {    while (Serial.available())    Serial1.write(Serial.read());  while (Serial1.available())    Serial.write(Serial1.read());}[code]`
[/code]

jremington

#1
May 17, 2018, 03:13 amLast Edit: May 17, 2018, 03:16 am by jremington
No. Baud rate = bit data rate in bits/second for serial data transmission.

"Frequency" does not apply because the data are transmitted asynchronously, with arbitrary pauses.

ted

#2
May 17, 2018, 03:31 am
The first line I know.
Baud rate it is not related with frequency ?
In serial communication we have 5V pulses with some frequency ?

jremington

#3
May 17, 2018, 03:44 amLast Edit: May 17, 2018, 03:46 am by jremington
Quote
In serial communication we have 5V pulses with some frequency ?
No. You don't send "pulses", you send line levels.

Consider the differences between serial transmission of a data byte == 0b10101010, a data byte == 0b11110000 and a data byte == 0.

ted

#4
May 17, 2018, 03:55 amLast Edit: May 17, 2018, 03:57 am by ted
so serial communication is not only - 0 and 1 ?

jremington

#5
May 17, 2018, 03:58 amLast Edit: May 17, 2018, 04:03 am by jremington
You REALLY need to read up on serial communications!

Beware, there are many. The Arduino uses the TTL voltage level variation of the ancient RS232 serial protocol.

ted

#6
May 17, 2018, 04:10 am
I will check by oscilloscope - easier

jremington

#7
May 17, 2018, 04:15 amLast Edit: May 17, 2018, 04:15 am by jremington
As my old chemistry professor used to say, two weeks of working in the laboratory can save you 1/2 hour of reading in the library.

ted

#8
May 17, 2018, 04:19 am
I expect to connect oscilloscope in less than in 2 weeks.

jremington

#9
May 17, 2018, 04:22 am
That is certainly encouraging!

ted

#10
May 17, 2018, 04:27 am
Thanks for some explanations.
Regards
Ted

westfw

#12
May 17, 2018, 07:42 am
I don't see any problem saying that a 57600bps line has a data rate of 57.6kHz.
That doesn't give you the real data bandwidth, or the shape of the waveform, and neglects the extra bits added to the data for framing, that aren't RealData.
But it's close enough until a bettter question comes along.

MrMark

#13
May 17, 2018, 03:29 pm
The first line I know.
Baud rate it is not related with frequency ?
In serial communication we have 5V pulses with some frequency ?
The distinction is that there are common signaling schemes that send more than 1 bit of information per signalling period.  Thus it is not true in general that baud rate is equivalent to signaling rate.  In the case of Arduino serial the signalling is binary, that is 1 bit of information per signalling period, so the baud rate and the signalling rate are the same for this case.

MarkT

#14
May 17, 2018, 04:15 pm
The first line I know.
Baud rate it is not related with frequency ?
In serial communication we have 5V pulses with some frequency ?
Well a 57.6kHz square wave would be 115200 baud as there are 115200 transitions per second,
but we don't talk of frequency for digital baseband, that's reserved for analog signals or modulated
carriers.

Baud rate is defined as the symbol transitions per second, not bits per second.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up