send via RS232 code
显示 更早的评论
I want to send xy coordinates from my matlab code to FPGA board via RS232. Can somebody help me with this code,I want to add it to my existing code.
回答(2 个)
Walter Roberson
2011-6-1
0 个投票
serial() to associate the port with an identifier. set() to configure things like speed. fopen() to open the port. fprintf() or fwrite() to send the data.
Greg
2011-8-16
0 个投票
1 个评论
Walter Roberson
2011-8-16
Strange how so? For example what do you get if you fwrite(s,char(0)) ?
Note that the start and stop bits have their logic levels reversed compared to data bits, and note that a data bit representing 1 is sent as a negative voltage with a 0 represented by a positive voltage. Also note that RS232 sends the least significant bit first.
类别
在 帮助中心 和 File Exchange 中查找有关 Fixed-Point Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!