C51 COMPILER V6.20c  ADC0831                                                               01/23/2016 23:45:03 PAGE 1   


C51 COMPILER V6.20c, COMPILATION OF MODULE ADC0831
OBJECT MODULE PLACED IN .\ADC0831.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE .\ADC0831.c DEBUG OBJECTEXTEND

stmt level    source

   1          
   2          #include "ADC0831.H"
   3          #include <AT89x51.h>
   4          
   5          sbit adc_CS = P3^5;
   6          sbit adc_CLK = P3^6;
   7          sbit adc_DATA = P3^7;
   8          
   9          void InitADC0831()
  10          {
  11   1      	adc_CLK = 0;
  12   1      	adc_CS = 1;
  13   1      	adc_DATA = 1;
  14   1      }
  15          
  16          unsigned char ReadADC0831()
  17          {
  18   1      	unsigned char Data;
  19   1      	unsigned char i;
  20   1      	adc_CS = 0;
  21   1      	;;;;;;;
  22   1      	for(i = 0; i < 10; i ++)
  23   1      	{
  24   2      		adc_CLK = 1;;;;;;;;
  25   2      		Data <<= 1;
  26   2      		Data |= adc_DATA;
  27   2      		adc_CLK = 0;;;;;;;;
  28   2      	}
  29   1      	adc_CS = 1;
  30   1      	return Data;
  31   1      }
  32          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     32    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
