필터 지우기
필터 지우기

How can I reduce SPI clock speed of arduino with Matlab command?

조회 수: 5 (최근 30일)
Michael
Michael 2015년 1월 27일
답변: Christoph Zimmermann 2019년 12월 10일
I use the MATLAB® Support Package for Arduino® Hardware to control devices with SPI communication. I use Matlab r2014b version with an Arduino uno
I need to reduce SPI clock speed to 250KhZ (2MHz default speed). It seems that when you create an SPI object you can only specify the SPI mode and the bit order.
example found on Mathworks: a = arduino(‘com9'); dev = spidev(a, 4, ‘spimode', 3, ‘bitorder', ‘lsbfirst');
I tried to add the property speed and SPIspeed with no success.
Is there a way?
Thanks
  댓글 수: 2
mervinj7
mervinj7 2015년 3월 24일
Where you able to figure this out? I also need to reduce the speed of the SPI as well. Thanks!
Michael
Michael 2015년 4월 7일
Unfortunately not.

댓글을 달려면 로그인하십시오.

답변 (1개)

Christoph Zimmermann
Christoph Zimmermann 2019년 12월 10일
The relevant property is called "bitrate"
Example: deviceObj = device(arduinoObj,'SPIChipSelectPin','D4','bitrate',2000000) creates a connection to the SPI device and sets the bitrate to 2000000 bits/s.
(Taken from https://ch.mathworks.com/help/supportpkg/arduinoio/ref/matlabshared.spi.device.html)

카테고리

Help CenterFile Exchange에서 WiFi에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by