Hi,
I want to know how I can interface the SPI with an external ADC. Has anyone done this before?
Here is my INIT SPI function:
=============================INIT_SPI=================================
void Init_SPI(void) { P3SEL |= 0x3F; // Select P3.0,1,2,3,4,5 P3DIR |= 0x0B; // Select P3.1,3 as output directions P3OUT &= ~0x01; ME1 |= USPIE0; // ENABLE USART0 SPI UCTL0 |= CHAR + SYNC + MM; // 8-bit data, SPI mode UTCTL0 |= CKPH + CKPL + SSEL1; // Inv.delay, ACLK UBR00 = 0x2A; // Baud Rate = 115200 UBR10 = 0x0; UMCTL0 = 0x0; // Clear Modulation UCTL0 &= ~SWRST; // Initialize USART state machine
//_BIS_SR(LPM3_bits + GIE); // Enter LPM0 w/interrupt
} //end Init_SPI
====================================================================
I'm using IAR. Thank you so much for your help!