The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: MATLAB serial fwrite() function, how to construct?
Replies: 5   Last Post: Apr 6, 2013 5:32 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 3
Registered: 3/4/09
MATLAB serial fwrite() function, how to construct?
Posted: Mar 4, 2009 11:21 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi all,

I'm using MATLAB serial function to communicate with a 8051 microcontroller from Atmel.

My problem is: I would like to write some binary data to my 8051 i/o port, for instance: 00001111, 00001110, etc...

I read and read the fwrite() format, it's like one start bit, one stop bit, and data bit, I tried many ways like fwrite(s, 15), fwrite(s, 240), or fwrite(s, [0 0 0 0 1 1 1 1 ], 'uint8'). And none of them worked.

And now I'm in stuck, can anyone with experiment give me some suggestions?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.