Part Number: MSP430FR2111
Hello all,
I am new to the MSP430FR2111 series MCUs, I am trying to do a simple A/D by sampling analog input with an NTC voltage divider on Pin 1.6 (A6) on the MSP430FR2111IPW16R. I have couple of questions:
1. How do I enable the internal reference of 1.2 V (reference for the ADC) to be buffered and output to pin P1.7 in software?
SLAU445G mentions setting EXTREFEN=1 in PMMCTL2 register to enable the external 1.2 V but also talks about a password to unlock the PMM registers?
Can someone help me in providing the exact command in CCS?
I'm trying to do this with no luck!
PMMCTL0 |= 0xA5; // unlock access to PMM registers.
PMMCTL2 |= 0x02; // write PMMCTL2_L bit 1 for external reference enable.
void initADC(void)
{
// Initialize ADC
PMMCTL0 |= 0xA5;
PMMCTL2 |= 0x02;
ADCCTL0 |= ADCMSC_1 | ADCON; // Conversions performed automatically
// ADC turned on
ADCCTL1 |= ADCSHP_1 | ADCSSEL_1 | ADCCONSEQ_2; // Use input signal
// ADC clock source is ACLK
// ADC conversion mode = repeat-single-channel
ADCMCTL0 |= ADCINCH_6; // Input channel set to A3 : JMS - UPDATE A3 to A0: ADCINCH_3 to ADCINCH_0
ADCIE |= ADCIE0; // Above upper threshold interrupt enabled
ADCCTL0 |= ADCSC | ADCENC; // Enable and start conversion
}
Any input is greatly appreciated.
Thanks,
Ganesan M.
