(1)ADC12SHS:取样保持信号源00:ADC12SC bit,这个是什么意思?
(2)转换存储寄存器ADC12MEMx,有两种数据格式,分别是右对齐的原码和左对齐的补码。那么,这两种情况下,数据读回时,读到的数据是怎样格式的?
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.
(1)ADC12SHS:取样保持信号源00:ADC12SC bit,这个是什么意思?
(2)转换存储寄存器ADC12MEMx,有两种数据格式,分别是右对齐的原码和左对齐的补码。那么,这两种情况下,数据读回时,读到的数据是怎样格式的?
我将ADCSHS选为01,即ADC12开始采样触发源为定时器,然后定时器该怎样配置,user‘s guide手册里写的不是很清楚。代码如下:
ADC12CTL0 = ADC12ON+ADC12SHT0_4 + ADC12REFON + ADC12REF2_5V;
ADC12CTL1 = ADC12SHP+ADC12CONSEQ_0 + ADC12SHS_1; // Use sampling timer, set mode
ADC12IE = 0x01; // Enable ADC12IFG.0
ADC12CTL0 |= ADC12ENC;
//ADC12CTL0 |= ADC12SC;
TA1CCTL0= CCIE + CCIS_1; // CCR0 interrupt enabled
TA1CCR0 = 30;
TA1CCR1 = 20;
TA1CTL = TASSEL_2 + MC_1 + TACLR; // SMCLK, upmode, clear TAR
这样配置后ADC12并没有被定时器触发。恳请解答。