ADC12 and DAC12 Modules - UAH(UAH ADC12和DAC12模块).pdfVIP

ADC12 and DAC12 Modules - UAH(UAH ADC12和DAC12模块).pdf

  1. 1、本文档被系统程序自动判定探测到侵权嫌疑,本站暂时做下架处理。
  2. 2、如果您确认为侵权,可联系本站左侧在线QQ客服请求删除。我们会保证在24小时内做出处理,应急电话:400-050-0827。
  3. 3、此文档由网友上传,因疑似侵权的原因,本站不提供该文档下载,只提供部分内容试读。如果您是出版社/作者,看到后可认领文档,您也可以联系本站进行批量认领。
查看更多
ADC12 and DAC12 Modules - UAH(UAH ADC12和DAC12模块)

ADC12 and DAC12 Modules by Alex Milenkovich, milenkovic@computer.org Objective: This tutorial discusses the use of MSP430’s ADC12 and DAC12 peripheral devices. Note: Required are all previous tutorials. 1. On-Chip Temperature Sensor Let us consider a C application shown in Figure 1 that samples the on-chip temperature sensor, converts the sampled voltage from the sensor to temperature in degrees Celsius and Fahrenheit, and sends the temperature sensor through a RS232 link to the Hyper-terminal application. Note: The source code for this program can be downloaded from the course secure directory (file temp_uart.c). Analyze the program and test it on the EasyWeb2 platform. Answer the following questions. What does the program do? How the basic block module is configured? How the ADC12 module is configured? How the USART0 module is configured? // Description: fMCLK = fACLK = 8MHz // // MSP430F149 // // /|\| XIN|- // | | | XTAL (8Mhz) // --|RST XOUT|- // | | // | P2.1|--LED // // @A. Milenkovic, milenkovic@computer.org // //****************************************************************************** #include msp430x14x.h #include stdio.h unsigned char thr_char; /* hold char from UART RX*/ unsigned char rx_flag; /* receiver rx status flag */ char gm1[67] = Hello! I am an MSP430. Would you like to know my temperature? (Y|N); char gm2[9] = Bye, bye!; char gm3[15] = Type in Y or N!; long int temp; long int IntDegF; long int IntDegC; char NewKey[25]; // initialize basic clock module void InitOsc(void); // UART Initializaion void UART_Initialize(void); //send char function void UART0_putchar(char c); void main(void) { int i = 0; WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer InitOsc(); UART_Initialize(); ADC12CTL0 = SHT0_8 + REFON + ADC12ON; A

您可能关注的文档

文档评论(0)

hhuiws1482 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:5024214302000003

1亿VIP精品文档

相关文档