Problem with changing spi mode of Arduino Uno
4 views (last 30 days)
Show older comments
Hi, I try to use the MATLAB Support Package for Arduino Hardware for SPI communication. I use Matlab 2015b and an Arduino Uno. When I try to change the spi mode it has no effect.
The code is like this:
a = arduino('COM7','Uno', 'Libraries', 'SPI')
dev = spidev(a, 'D10', 'mode', 3)
I checked the signals with a logic analyzer and the SCLK is always mode0 no matter which mode (0, 1, 2, or 3) I want to use.
Any idea?
2 Comments
Madhu Govindarajan
on 2 Dec 2015
I am not particularly familiar with this topic, but according to this page https://www.arduino.cc/en/Reference/SPI it looks like the Clock is on Pin 13?
HTH
Answers (0)
See Also
Categories
Find more on Run on Target Hardware 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!