mcp4131 and attiny85

Mmm, that code gives me back error messages from the tiny core. Have i formatted the code correctly?

#define CS     1
#define dataPin      3
#define clockPin 2

void setup() {

pinMode(CS, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);

}

void loop() { 
  
int  command_data;
  
digitalWrite (CS, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, highByte (command_data) );
shiftOut(dataPin, clockPin, MSBFIRST, lowByte (command_data) );
digitalWrite (CS, HIGH);

}

Thanks for the pointers mate :slight_smile: