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

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일

0 개 추천

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)

카테고리

도움말 센터File Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기

질문:

2015년 1월 30일

답변:

2015년 12월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by