文件名称:ADC

  • 所属分类:
  • 微处理器(ARM/PowerPC等)
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2013-08-02
  • 文件大小:
  • 126kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 宋**
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

3.A/D程序设计与电路仿真

通过AD对外部电压进行AD采样,然后利用SPI接口对采样回来的数据进行显示,并将转换结果通过UART发给上位机进行显示。

首先设置需要显示的数组,使用PINSEL0、PINSEL1寄存器设置串口0的连接端口,使用IO0DIR设置74HC595的控制口,初始化串口0,使用U0LCR、U0DLM、U0DLL、U0LCR寄存器设置波特率,初始化SPI接口,设置SPI的时钟分频、接口模式。

其次对ADC模块进行设置,通过移位设置寄存器ADCR选择通道0,设置转换时钟,利用软件进行转换操作,使用时钟转换,工作模式为非掉电转换模式、非测试模式、直接启动ADC转换,使用引脚下降沿触发ADC转换,读取ADC结果,并清除DONE标志位,切换通道并进行第一次转换,等待转换结束,然后再次启动转换,读取ADC的结果,从串口中输出结果,分别输出个位、十位、百位、千位数据。

-3. A/D circuit simulation program design and the external voltage through the AD AD sampling, and then come back using the SPI interface of the sampling data show, and the conversion results sent to the host computer via the UART for display. First set the array needs to be displayed, use PINSEL0, PINSEL1 register set the serial port 0, use the control port IO0DIR set 74HC595, initialize the serial port 0, use U0LCR, U0DLM, U0DLL, U0LCR register set the baud rate, initializing the SPI interface, set SPI clock frequency, interface mode. Second, the ADC module settings, through the shift register ADCR select channel 0 setting, set the conversion clock, use software to convert, use the clock conversion, down conversion mode for non-operating mode, non-test mode, direct start ADC conversion, the use of pin falling edge trigger ADC conversion, read the ADC result and clears the DONE flag, switch channels and make the first conversion, waiting for the end of conversion, and then start the co
(系统自动生成,下载前可以参看下载内容)

下载文件列表





ADC\ADC.axf

...\ADC.C

...\adc.crf

...\adc.d

...\ADC.DSN

...\ADC.hex

...\ADC.htm

...\adc.i

...\ADC.lnp

...\ADC.map

...\adc.o

...\ADC.Opt

...\ADC.plg

...\ADC.PWI

...\ADC.sct

...\ADC.tra

...\adc.txt

...\ADC.Uv2

...\ADC_Opt.Bak

...\ADC_Target 1.dep

...\ADC_Uv2.Bak

...\Config.h

...\Last Loaded ADC.DBK

...\LPC2138.H

...\Startup.lst

...\Startup.o

...\Startup.s

...\Target.c

...\Target.h

ADC

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org