Re: Writing to the serial port at 25 Hz



You'll want to use a few commands: serial(), fopen(), fprintf(), and
fclose()

It goes something like this:

s1 = serial('COM1', 'BaudRate', 9600, 'DataBits', 8, 'Parity', 'none',
'StopBits', 1, 'FlowControl', 'none');

fopen(s1);

%Now write to your device -- customize this part (write your own code
using fprintf() )
fprintf(s1, '%d', dataByte);

%Now close device
fclose(s1);

.



Relevant Pages