Hello,
Can you pls help to verify the below code to transmit from MSP430 to DAC via SPI.
Task: to transmit 8-bits data from MSP430 to DAC5311 when there is a change in duty cycle.
Issue: The output of DAC5311 is always reading zero regardless of what input is transmit to DAC5311
Can you confirm do I need to use USI interrupt service routine?
-----------------------------------
//SJ4060111 - Setting USI
USICTL0 |= USIPE6 + USIPE5 + USILSB + USIMST + USIOE; //SJ4130111 - Port, SPI Master
//USICTL1 |= USIIE; //SJ4130111 - Not sure if we need it.
USICKCTL = USISSEL_2; //SJ4130111 - /1 SMCLK USICTL0 &= ~USISWRST; // USI released for operation
//Transmit to DAC5311
DAC_SYNC_LOW; //SJ4130111 - Set pin 1.4 to low
USISRL = duty_cycle; //init-load data - Low Byte Shift Register //USISRH = ; //High Byte Shift Register USICNT = 8;
DAC_SYNC_HIGH; //SJ4130111 - Set P1.4 high
------------------------------------