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.

[参考译文] TM4C123GH6PM:tm4c123gh6pm

Guru**** 2524550 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/789666/tm4c123gh6pm-tm4c123gh6pm

器件型号:TM4C123GH6PM

你(们)好

我使用 tm4c123ghpm 的 ADC1作为远程节点读取模拟传感器值、这反过来又显示在串行接口上。  

问题是、我尝试将数据发送到串行接口、即使在禁用 ADC 的序列发生器后、我也会获得2个模拟值、我如何纠正此问题。

位代码如下所示。

void ADC_INThandler (void){
int i;
ADC1_ISC_R |=(1<<3);

SSI2_CR1_R |=(1<<1);

ADC1_ACTSS_R &=~(1<<3);
adcResult = ADC1_SSFIFO3_R;
temp_result = adcResult;
delay();
printString ("\n\n"r);
for (i=0;i<4;i++)

temp[i]= adcResult % 10;
adcResult = adcResult/10;
char c = temp[i]+"0";
printChar (c);//UART  
LCD_OutChar (c);//LCD
SSI2_DR_R = c;//SPI  
while (((SSI2_SR_R &(1<0))= 0);


//SSI2_CR1_R &=~(1<<1);

提前感谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Basavanagouda、您好!

    我们不支持针对 TM4C MCU 的直接寄存器编程、请为您的应用使用 TivaWare、它已经具有实现此应用所需的所有 API。

    有关更多详细信息、请参阅我们的论坛指南第4节、了解我们再次对 DRM 编程的立场: e2e.ti.com/.../695568