On the MSP430G's you use the PSEL and PSEL2 registers to select which peripherals you want to use. For example: with the msp430g2553 pin 14 (P1.6) has the following functionality. P1.6/TA0.1/UCB0SOMI/UCB0SCL/A6/CA6/TDI/TCLK. Now, with the two PSEL registers you get to set four values. 00, 01, 10, 11. I'm a bit confused because it looks like there are more than 4 peripherals. I'm trying to use UCB0SOMI and from looking at this it looks like the first peripheral would be TA0.1 and the second would be UCB0SOMI so I would think you would set the PSEL registers as follows: P1SEL1 &=~ BIT6, P1SEL2 |= BIT6 giving you a value of 10 or two. I feel like I'm missing something though because a lot of the examples I've seen for using SPI on UCB0 set bot PSEL1 and PSEL2 to 1 yielding 11.
Whats the deal? How do I know exactly what to set the PSEL registers to so I can get the correct peripheral?
Thanks