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.

MSP430FR5739 ADC的问题

Other Parts Discussed in Thread: MSP430FR5739

设置为

// Configure ADC10 - Pulse sample mode; ADC10SC trigger    

 ADC10CTL0 &= ~ADC10ENC;                        // Ensure ENC is clear    

ADC10CTL0 = ADC10SHT_5 + ADC10ON;         // 16 ADC10CLKs; ADC ON    

ADC10CTL1 = ADC10SHP + ADC10CONSEQ_0;     // s/w trig, single ch/conv    

ADC10CTL2 = ADC10RES;                     // 10-bit conversion results    

ADC10MCTL0 = ADC10SREF_1 + ADC10INCH_11;  // AVcc/2            // Configure internal reference    

while(REFCTL0 & REFGENBUSY);              // If ref generator busy, WAIT    

 REFCTL0 |= REFVSEL_1+REFON;                    

 __delay_cycles(10000);                      // Delay for Ref to settle

 

 VccValue = (10*ADC10MEM0)>>8;

 

而数据手册里看到Nadc=1023*(Vin-Vr-)/Vr+-Vr-

Vin=ADC10MEM0*2/1024  才对,为什么例子里剩10再除256。应该直接可除512