Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
Gnay

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?

Haoya



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.