How can I change SPI mode of an Arduino through Matlab?

9 ビュー (過去 30 日間)
Michael
Michael 2015 年 1 月 30 日
回答済み: Menghan 2015 年 12 月 16 日
I use the MATLAB® Support Package for Arduino® Hardware to control devices with SPI communication. Matlab r2014b version with an Arduino uno.
It seems that modifying the mode has no effect. Setting mode to 0 should idle clock low and setting it to 3 for example should idle clock high. But it doesn't...
Code example:
a = arduino('com9'); dev = spidev(a, 4, 'mode', 0);

回答 (1 件)

Menghan
Menghan 2015 年 12 月 16 日
It is a bug in MATLAB R2014b. If you are still looking for a fix, please contact MathWorks technical support to get a patch.
Menghan
(MATLAB Hardware Team - MathWorks)

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Arduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by