MATLAB Answers

Michael
0

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

Asked by Michael
on 30 Jan 2015
Latest activity Answered by Menghan
on 16 Dec 2015
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);

  0 Comments

Sign in to comment.

1 Answer

Answer by Menghan
on 16 Dec 2015

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)

  0 Comments

Sign in to comment.