AD 5668 DAC project, library update request

Hi,

I am trying to rework a library for an AD5668 DAC created by bobhart for a school project I am working on, the problem that I am facing is that the library has been created for the MEGA/UNO boards where the SPI pins are located on the pin outs, I however am using an Arduino Due, where the SPI/ICSP pins are located on a specific pin header located on the top part of the board. The AD5668 library link is here

https://github.com/bobhart/AD5668-Library

If you can see below the library makes use of the SPI pin outs that the MEGA or UNO might have, is there anybody who could give me some advice on how to declare the pin headers for MOSI and MISO for the Arduino Due? Any help would be much appreciated.

Thanks in advance.

Code from example-

unsigned int vOut = 0;

/*
*  Hardware SPI instance, "AD5668(ssPin, clrPin, ldacPin);"
*  ssPin is connected to AD5668 ~SYNC pin (pin 2), clrPin is connected to
*  AD5668 ~CLR pin (9) and ldacPin is connected to AD5668 ~LDAC pin (1).
*  Connect the AD5668's Din pin (15) to the Arduino's MOSI pin, and the SCLK
*  pin (16) to the Arduino's SCK pin.
*/
AD5668 DAC = AD5668(10, 9, 8);

/*
*  Software SPI instance, "AD5668(mosiPin, sclkPin ,ssPin, clrPin, ldacPin);"
*  mosiPin is connected to AD5668 Din pin (15) and sclkPin to AD5668 SCK
*  pin (16). Remaining connections as explained above.
*/
//AD5668 DAC = AD5668(5, 6, 7, 8, 9);

void setup() {
	Serial.begin(9600);
	SPI.begin(10);

	// initialize the DAC
	DAC.init();

	//DAC.enableInternalRef(); // Uncomment this line to turn on the internal reference.
	DAC.powerDAC_Normal(B11111111); // Power up all channels normal
}

void loop() {
	for (int v = 0; v <= 5; v++) {
		for (int chAdr = 0; chAdr <= 7; chAdr++) {
			if (v == 0) {
				vOut = 0;
			}
			vOut = (v * 13107);
			DAC.writeChannel(chAdr, vOut);
		}
		DAC.toggleLDAC();
		
		delay(5000);
	}

Code from library-

#include "AD5668.h"
#include <SPI.h>

// Hardware SPI Constructor, must use hardware SPI bus pins
AD5668::AD5668(uint8_t ssPin, uint8_t clrPin, int8_t ldacPin) {
  _ssPin = ssPin;
  _clrPin = clrPin;
  _ldacPin = ldacPin;
  pinMode(_ssPin, OUTPUT);
  pinMode(_clrPin, OUTPUT);
  if (_ldacPin > 0) {
    pinMode(_ldacPin, OUTPUT);
  }
  _hwSPI = true;
}

// Software SPI Constructor, may use any digital pins
AD5668::AD5668(uint8_t mosiPin, uint8_t sclkPin, uint8_t ssPin, uint8_t clrPin, int8_t ldacPin) {
  _mosiPin = mosiPin;
  _sclkPin = sclkPin;
  _ssPin = ssPin;
  _clrPin = clrPin;
  _ldacPin = ldacPin;
  pinMode(_mosiPin, OUTPUT);
  pinMode(_sclkPin, OUTPUT);
  pinMode(_ssPin, OUTPUT);
  pinMode(_clrPin, OUTPUT);
  if (_ldacPin > 0) {
    pinMode(_ldacPin, OUTPUT);
  }
  _hwSPI = false;
}

Try this:

AD5668 DAC = AD5668(MOSI, SCK, SS, 8, 9);

SS is pin 10. You can set the other two (8 and 9) to whatever you like.