This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PxSEL and PxSEL2

Other Parts Discussed in Thread: MSP430G2553

Hi,

I am studying the user guide of the MSP430g2553 "MSP430x2xx Family User's Guide (Rev. I)", on page 337 of the guide (SLAU144i) I can read :

PxSEL2 PxSEL Pin Function
0 0 I/O function is selected.
0 1 Primary peripheral module function is selected.
1 0 Reserved. See device-specific data sheet.
1 1 Secondary peripheral module function is selected.
Setting PxSELx = 1 does not automatically set the pin direction. Other peripheral module functions may
require the PxDIRx bits to be configured according to the direction needed for the module function. See
the pin schematics in the device-specific data sheet
.

In "MSP430G2x53, MSP430G2x13 Mixed Signal Microcontroller (Rev. J)" document on page 3, I can see pin schematics but I don't understand.

For exemple if I take PIN 7 of port 1:

P1.7/CAOUT/UCB0SIMO/UCB0SDA/A7/CA7/TDO/TDI

I don't understand why there are 8 possibility ?

If I want to select P1.7 I use (PxSEL &= ~PIN7; PxSEL2 &= ~PIN7)

If I want to select UCB0SDA I use (PxSEL |= PIN7; PxSEL2 |= PIN7)

And how can I do if I want to select A7?

Many Thanks


  • Page 3 of the datasheet only provides an overview, giving the pin assignments for the various package types. You'll need to look at the "Port Schematics" section (P42-57) for the details.

    After the block diagram for each group of pins there is a table which explains the register settings that correspond with each pin function.

    Also, pages 6-8 have a table with short descriptions for each of the pin function names. That can help with deciphering the meaning of the pin names.

  • Hi,

    Thank you very much for your help, it's exactly what I wanted.

    Best regards.

**Attention** This is a public forum