How can I convert serial data to a binary sequence?
古いコメントを表示
> 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 件のコメント
Walter Roberson
2017 年 3 月 16 日
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
2017 年 3 月 17 日
Walter Roberson
2017 年 3 月 17 日
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
2017 年 3 月 19 日
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.
採用された回答
その他の回答 (1 件)
fateme zabihi
2021 年 3 月 8 日
0 投票
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?
カテゴリ
ヘルプ センター および File Exchange で AI for Signals についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


