How can I convert serial data to a binary sequence?
Mostra commenti meno recenti
> The sequence is 01011010 how can I change from the square wave shown here to a square wave that shows just 01011010? The data rate is 600 bits per second and I am sampling at about 3 times that. Thank you.
4 Commenti
Walter Roberson
il 16 Mar 2017
Is the diagram intended to display one copy of sampling 01011010 at 1800 samples per second? Is the x axis numbering sample numbers or milliseconds?
For the numbering to make sense as sample numbers, there would have to be about 83 groups of 8 bits.
For the x axis number to make sense as milliseconds, there would have to be about 18 groups of 8 bits.
Brendan Lyden
il 17 Mar 2017
Walter Roberson
il 17 Mar 2017
I was misreading the readings a bit.
On my display it appears that 3 cm corresponds to 80 samples. The overall display shows up as 7.8 cm, so that would be 7.8*(80/3) = 208 samples.
The sample counts would work out if there were 4 samples per bit rather than 3 -- 208/4 = 52 bits, which would be 6 1/2 repetitions of 8 bits. For the sample count to work out with 3 samples per bit, there would have to be between 8 and 9 repetitions rather than between 6 and 7.
Walter Roberson
il 19 Mar 2017
I see in the other discussion that you are sampling at about 3000 samples per second. 208 samples at 3000 samples per second of 600 data bits per second would only be enough samples for 5 complete repetitions.
Question: are you sending async or synchronous? If you are sending async with RS232 then you need to worry about start bits and stop bits, and you have to know the number of each; pretty much everyone uses 1 start bit, but the number of stop bits used varies a bit. Asynch implies that the transitions need to be detected rather than assuming a fixed frequency.
It would also be important to know if you are using a protocol such as bisync or NRZ or NRZI.
Risposta accettata
Più risposte (1)
fateme zabihi
il 8 Mar 2021
0 voti
hello
I have a 4-bit output as a pulse that I want to multiply by 8, 4, 2, and 1 based on the importance of the bits and see the final output. What should I do?
Categorie
Scopri di più su AI for Signals in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


