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.

  1. 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); }

Be the first to answer this question.