Go Down

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

ted

May 17, 2018, 02:37 am Last 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 1

void 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 am Last 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

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 am Last 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 am Last 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 am Last 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

I will check by oscilloscope - easier

jremington

#7
May 17, 2018, 04:15 am Last 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

I expect to connect oscilloscope in less than in 2 weeks.

jremington


ted

Thanks for some explanations.
Regards
Ted


westfw

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

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

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