image thumbnail

设备驱动程序

version 1.6.0.1 (1.88 MB) by Giampiero Campa
Developing Simulink Device Driver Blocks: Step-By-Step Guide and Examples

23.4K Downloads

Updated01 Sep 2016

View License

Editor's Note:This file was selected as MATLAB CentralPick of the Week

This package contains a guide that explains, in a step-by-step fashion, how to develop device driver blocks (blocks that perform target-specific functions when executed on a target platform).
Example drivers for:
-) Arduino digital output
-) Arduino digital input
-) Arduino analog output
-) Arduino编码器读
are included.

While the examples are built using the Arduino as the hardware platform (specifically relying on the Simulink Support Package for Arduino), the method applies to any other supported target.

In this guide, the first method to develop device drivers is based on the S-Function Builder block. Following chapters also describe different methods based respectively on the Legacy Code tool, the MATLAB function block, and the System Object block. Advantages and disadvantages of each method are discussed in the guide.

Finally, note that for MATLAB 2013b you will need to apply a fix for the S-Function builder to develop blocks with no input. To do so, go to the following page://www.tatmou.com/support/bugreports/1006532, scroll down to the bottom, and follow the instructions therein.

Cite As

Giampiero Campa (2021).设备驱动程序(//www.tatmou.com/matlabcentral/fileexchange/39354-device-drivers), MATLAB Central File Exchange. Retrieved.

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!