?? adcsingl.lst
字號:
C51 COMPILER V7.04 ADCSINGL 09/30/2003 10:54:52 PAGE 1
C51 COMPILER V7.04, COMPILATION OF MODULE ADCSINGL
OBJECT MODULE PLACED IN ADCSINGL.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ADCSINGL.C BROWSE DEBUG OBJECTEXTEND
stmt level source
1 /*********************************************************************
2
3 Author : ADI - Apps www.analog.com/MicroConverter
4
5 Date : October 2003
6
7 File : ADCsingl.c
8
9 Hardware : ADuC842
10
11 Description : Performs repeated single ADC conversions and moves
12 results to UART. Sets the red LED on the eval
13 board upon completion of each conversion.
14 All rate calculations assume an 2.097152MHz Mclk.
15
16 *********************************************************************/
17
18 #include<stdio.h>
19 #include<aduc842.h>
20
21 sbit LED = 0x0B4; //P3.4 drives red LED on eval board
22
23 void adc_int() interrupt 6{
24 1 printf("\n%02BX%02BX\n",ADCDATAH,ADCDATAL);
25 1 return;
26 1 }
27 void DELAY(int); // Function prototype
28 void main(void)
29 {
30 1 int CHAN=0;
31 1
32 1 /* Set up UART */
33 1 T3CON = 0x083;
34 1 T3FD = 0x02D;
35 1 SCON = 0x052;
36 1
37 1 /* PRECONFIGURE...*/
38 1
39 1 ADCCON1 = 0x0AC; // power up ADC
40 1 ADCCON2 = CHAN; // select channel to convert
41 1 EA = 1; // enable interrupts
42 1 EADC = 1; // enable ADC interrupt
43 1
44 1 /* PERFORM REPEATED SINGLE CONVERSIONS...*/
45 1
46 1 for(;;)
47 1 {
48 2 DELAY(17000);
49 2 LED ^= 1; // Complement LED
50 2 SCONV = 1; // Perform single conversion
51 2 while (ADCI == 0)
52 2 {
53 3 } // wait for interupt
54 2 }
55 1
C51 COMPILER V7.04 ADCSINGL 09/30/2003 10:54:52 PAGE 2
56 1 }
57
58 void DELAY(int length)
59 {
60 1 while (length >=0)
61 1 length--;
62 1 }
63
64
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 125 ----
CONSTANT SIZE = 13 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -