I am trying to use PGA116 multiplexer to select 4 signals and using msp430g2553 to select the channels .
I have trouble understanding which pin from the microcontroller is connected to the multiplexer to select the channels. I gone through the data sheet and connected the SCLK, MISO, MOSI between the two devices.
I also found the code from this link http://www.argenox.com/library/msp430/ch9-msp430_spi.php
I connected everything as per design ,but i cant get the multiplexer to work....So please find a solution for my problem as soon as possible.
#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P1OUT |= BIT5;
P1DIR |= BIT5;
P1SEL = BIT1 | BIT2 | BIT4;
P1SEL2 = BIT1 | BIT2 | BIT4;
UCA0CTL1 = UCSWRST;
UCA0CTL0 |= UCCKPH + UCMSB + UCMST + UCSYNC; // 3-pin, 8-bit SPI master
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 |= 0x02; // /2
UCA0BR1 = 0; //
UCA0MCTL = 0; // No modulation
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
}