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?