Go Down

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

ted

#15
May 17, 2018, 06:51 pm Last Edit: May 17, 2018, 07:06 pm by ted
Some strange things on USB camera.
Expected 5V pulses they but are 0.3V.
The signals on Rx and Tx are very similar.
So USB not always is using 5V pulses

Mentioned above definitions are know to me, but relation to frequency is not clear.

expected pulses




ted


MrMark

#17
May 17, 2018, 07:56 pm Last Edit: May 17, 2018, 07:59 pm by MrMark
After reading through the thread a few times, I gather that you're trying to use a USB camera of some sort on an Arduino Leonardo, but I'm not really certain of your intent.  That's why it's always helpful to give a brief synopsis of your project when starting a new thread.  If this is correct, then it's almost certainly not going to happen.

ted

Mentioned above definitions are know to me, but relation to frequency is not clear.



I am not using arduino ,just regular USB camera, in drawing  above arduino is the part of copied picture (ignore it ) look only on right side - pulses.
This is for better understanding USB serial communication.

MrMark

#19
May 17, 2018, 08:52 pm Last Edit: May 17, 2018, 08:53 pm by MrMark
I see where I've gone wrong.  I guess the Leonardo comments in the code from the original post, the Arduino function call in the title, the picture of an Arduino in above picture, and reading a post on forum.arduino.cc distracted me from the critical initial reference to USB on thread post #15.

ted

So the question is - the width of the pulses for 57600 speed, from this I can calculate the frequency.

MrMark

I'll go with 83.3 nanoseconds and the caveat that I could be misinterpreting the question and the actual problem at hand.

ted

For now, I have too many things on the table,  some day I will connect arduino to oscilloscope.

Southpark

#23
May 17, 2018, 11:40 pm Last Edit: May 17, 2018, 11:42 pm by Southpark

Where did you measure this waveform? Is it 'supposed' to really be phase shift keying?





ted

on Rx and Tx, PSK = Phase Shift Keying that what I see - The question is not about modulation

Power_Broker

Maybe I'm crazy, but that doesn't look like PSK to me. It just looks like a really noisy serial bus.

Does the OP have any more questions at this point?
"The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind."
   - Nikola Tesla

ted

That noise it is Video signal, since no one was able to answer  "frequency" question I will do - Post # 22

GolamMostafa

Bit Rate vs Baud Rate (Bd): In communication theory, Baud Rate (Bd) refers to quantitative measure of information being transmitted/received by a carrier. A carrier is said to be conveying information when the modulating signal (the information) brings changes in its amplitude, frequency or phase. Every change in the carrier is an information bit (the baud).

In asynchronous serial communication, there is no carrier. The bits being carried out over the TX-line are all information bits. So, the Baud Rate is equal to the Bit Rate.

Figure-1: Waveform for asynchronous data frame for character A (TTL Logic)

(a) Assume Bd = 4800; Even-parity (number of 1s in the data field is even).
(b) Frame Length : 11 (1-Start Bit, 8-Data bit, 1-parity bit, and 1-Stop bit)
(c) Bit Rate = Baud Rate = 4800. Bit Period = 1/4800 = 208 ┬Ás.

There are cases where Baud Rate is different from Bit rate. For example: The Bell 212A type modem uses 1200 Hz sine wave carrier for transmission. It uses the so called 'dibit encoding', where '2 consecutive bits' in the data stream is treated together. In this scheme, the value of these two bits determines the amount of phase shift to be occurred in the carrier. The relationship is:

dibit value       phase shift
00                  00
01                  900
11                  1800
10                  2700

Now, assume that the bit pattern 00 11 01 01 11 01 would be transmitted using the dibit encoding scheme. The relationship between the values of the dibits and the phase shifts of the carrier is depicted below in Fig-7.1. The value of the 1st dibit is 00, so there is no phase shift of the carrier. The value of the 2nd dibit is 11, so the phase shift of the carrier is 1800 and it has occurred at the elapse of 1800 from point B. In a similar way, we have indicated the phase shift points for the remaining dibits of the data stream.


Figure-2: Waveform for simple phase-shift modulation

Now, we are in a position to explain the difference between the Bit Rate and the Baud Rate. At 1200 Hz carrier frequency, one cycle period is required for the shifting of 1-bit data into the phase-shift keying modulator. In the example of Fig-2, we have 12-bit data; we need 12 clock cycles to shift them into the modulator. So, the Bit Rate: 1200 bits/sec.

Now, let us look at the carrier; we observe that there are only 6 changes in the carrier. The 12-bit data have brought only 6 changes in phases of the carrier. The information content is 6 Baud. The Baud Rate is half of the Bit Rate and it is: 600 Bd.  


Wawa

I think OP just wants to know the data rate of a 640x480 USB camera (post#11).
Leo..

Go Up