很重要的Freescale 68HC12單片機 adc程序
- #include <hidef.h> /* common defines and macros */
- #include "derivative.h" /* derivative-specific definitions */
- #include "ADC.h"
- void main(void) {
- /* put your own code here */
- byte AD_Value;
- DDRA = 0xFF;
- PORTA = 0xFF;
-
- AD_Init();
- EnableInterrupts;
- for(;;) {
- //if(ATD0STAT0 && 0x80 != 0)
- //{
- //AD_Value = ATD0DR0L;
- // PORTA = AD_Value;
- //}
-
- _FEED_COP(); /* feeds the dog */
- } /* loop forever */
- /* please make sure that you never leave main */
- }
復制代碼
下載:
ADC.rar
(195.98 KB, 下載次數: 7)
2017-4-27 18:25 上傳
點擊文件名下載附件
|