找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2845|回复: 0
打印 上一主题 下一主题
收起左侧

Freescale 68HC12单片机ADC程序

[复制链接]
跳转到指定楼层
楼主
很重要的Freescale 68HC12单片机adc程序


  1. #include <hidef.h>      /* common defines and macros */
  2. #include "derivative.h"      /* derivative-specific definitions */
  3. #include "ADC.h"


  4. void main(void) {
  5.   /* put your own code here */
  6.   byte AD_Value;
  7.   DDRA = 0xFF;
  8.   PORTA = 0xFF;
  9.   
  10.   AD_Init();


  11.         EnableInterrupts;


  12.   for(;;) {
  13.     //if(ATD0STAT0 && 0x80 != 0)
  14.     //{
  15.         //AD_Value = ATD0DR0L;
  16.        // PORTA = AD_Value;
  17.     //}
  18.    
  19.     _FEED_COP(); /* feeds the dog */
  20.   } /* loop forever */
  21.   /* please make sure that you never leave main */
  22. }
复制代码


下载:
ADC.rar (195.98 KB, 下载次数: 7)




分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表