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.

MSP430F2003 SD16_A How to configure the Inputs

Other Parts Discussed in Thread: MSP430F2003

Hello,

I'm using the MSP430F2003 with the intern 16bit ADC. I want to use serval differential inputs, but how must I configure them?

I want to use channel A4+/-:

SD16INCTL0 = SD16INCH_4;           // Enable channel A4+/-                          
SD16AE = SD16AE2;                           // Enable external input on A4-

Is this enough? Or must it be

SD16AE = (SD16AE1 + SD16AE2);

And if I want to configure A1+ to external input and A1- to Vss?

SD16INCTL0 |= SD16INCH_1;           // Enable channel A1+/-  
SD16AE = SD16AE2;                            // enable external input on A1+

Can somebody help me? I'm a little bit confused.

Thanks,

Johannes

  • P1.1 is A0- input as well as A4+ input. You cannot use it for both at the same time except if the voltages you're measuring are 'stacked'.

    However, the SD16AE2 bit is required to enable P1.2 as A4- input. And will at the same time disable the digital output on this pin.
    If the bit is not set, the negative input of A4 is AVss. The use as positive input to A1 is independent. For A1+ usage, you msut disabel the digital output manually by switchign th eport to input.

    See the port schematics in the device datasheet.

    Johannes Kreuzer said:
    And if I want to configure A1+ to external input and A1- to Vss?

    Then you don't need the SD16AE2 bit. You'd only need SD16AE3 if you want to use the A1- input.

    I guess whoever wrote the code you cited did, (ab)use the SD16AE2 bit to disable the digital output on P1.2, not caring for the side-effect it would have A4-.