digital ouput via usb or serial port
1 view (last 30 days)
Show older comments
GUYZ PLEASE HELP.... I NEED TO GIVE DIGITAL OUTPUT OF A MICROCONTROLLER ON PC. FOR THIS CONNECTED A SERIAL RS232 PORT WHITH A USB CONNECTOR.
NOW HOW DO I GET IT????
0 Comments
Answers (1)
Walter Roberson
on 31 Mar 2011
If you need to read from a serial port, the use serial() to create a serial port object and set some of its attributes, use set() to set more extended attributes for handling the port, and fopen() the port. If the fopen works, the fread() or fgetl() or fgets() from the port will input values from the serial port. The number of bytes ready to read at any one time will be the BytesAvailable property of the serial port object. You might want to set up a BytesAvailableFcn callback to be triggered when a given number of bytes appears or when the input detects a callback.
0 Comments
See Also
Categories
Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!