Matlab tells me Arduino Mega 2560's PIN 53 is MOSI while Arduino clearly states that it is SS
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to control 11 SPI based Digital Potentiometers (AD5292) through Arduino Mega 2560 which is in turn controlled by Matlab. I have installed the MATLAB Support Package for Arduino Hardware so that I can control my Arduino through the GUI I have created in Matlab. According to Arduino, the PINs for SPI are 50(MISO), 51(MOSI), 52(SCK) and 53(SS), this PIN 53 is the slave select pin and is only needed when I am using my Arduino as an SPI slave, when I am not using my Arduino as an SPI slave (like in my case) I can use PIN 53 as a constant digital output. When I try to use SPI while PIN 53 configured as Digital Output, Matlab gives me an error "Board Mega2560, SPI communications require pins D53(MOSI) which is currently in use. To use SPI, configure them to 'SPI'". When I have not configured PIN 53 at all (no configuration and no connection to this pin) my SPI devices work fine (which shouldn't be the case if PIN 53 was MOSI). My question is why does Matlab thinks that PIN 53 is MOSI and how can I solve this problem?
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Setup and Configuration en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!