How to send/recive txt file using RS232

2 ビュー (過去 30 日間)
Roko
Roko 2011 年 3 月 25 日
コメント済み: Walter Roberson 2022 年 7 月 19 日
Hi,
I'm working on some project with RS232 and I need to send text file using RS232. Can somebody explain me how to do it? Thanks!
  2 件のコメント
Jan
Jan 2011 年 3 月 26 日
Using Matlab or Simulink? Do you have the Instrument Control Toolbox?
Roko
Roko 2011 年 3 月 26 日
Matlab, i have Instrument Control Toolbox

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 3 月 26 日
The old xmodem file transfer protocol is very easy to write. zmodem was a lot more efficient but more difficult to write, but likely you could find source in C somewhere. For more complex requirements like file serving, consider using c-kermit -- a much larger package but well designed and quite robust.
Or you could go for SLIP or PPP and use them to run IP over serial, allowing you to use programs such as FTP or SCP.
  6 件のコメント
Brian
Brian 2022 年 7 月 19 日
Success! Wrote this over the weekend and was able to finally test it last night. The one hiccup I had was that the CRC-16 calculator I referenced above outputs the 16-bit crc in little-endian, while XMODEM expects it in big-endian. Thanks for your help!
Walter Roberson
Walter Roberson 2022 年 7 月 19 日
It doesn't really matter whether you use big-endian or little-endian as long as the two sides are consistent.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by