Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years ago.
SPI and digital potentiometer
Hi I have a problem with the comunication between STM nucleo and digital potentiometer with SPI interface. It don't change the resistance.
- include "mbed.h"
SPI spi(D11,D12,D13); inizializzo la porta spi DigitalOut cs(D10);
int main() { cs=1; spi.format(8,3); wait_ms(50);
cs=0; wait_ms(50);
spi.write(0); wait_ms(20); cs=1;
wait_ms(20); }