⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mineon.lst

📁 image capture billing control system
💻 LST
📖 第 1 页 / 共 5 页
字号:
C51 COMPILER V5.50,  MINEON                                                                06/03/01  11:32:07  PAGE 1   


DOS C51 COMPILER V5.50, COMPILATION OF MODULE MINEON
OBJECT MODULE PLACED IN MINEON.OBJ
COMPILER INVOKED BY: C:\俺惯砒\C51\BIN\C51.EXE MINEON.C CD SB DB COMPACT

stmt level    source

   1          /*
   2          	8MB disable
   3          */
   4          
   5          #include <reg52.h>
   6          #include <DEF.H>
   7          
   8          void Delay(Dword j)
   9          {
  10   1      	Dword i;
  11   1      	for( i=0 ; i<j ; i++ );
  12   1      }
  13          
  14          void Delay_10us(Byte time)
  15          {
  16   1      // one loop = 6 instruction = 6*0.25us = 1.5us
  17   1      	Byte i, j;
  18   1      
  19   1      	for(j=0 ; j<time ; j++)
  20   1      	{
  21   2      		for(i=0 ; i<6 ; i++);	// 6*1.5 = 9	// 9 + etc = approx. 10
  22   2      	}
  23   1      }
  24          
  25          /*
  26          void Delay_Sec(Byte sec)
  27          {
  28          // 66 machine cycle
  29          // 1 machine cycle = 0.25us
  30          // 66*0.25
  31          // 33*3 = 100us = 0.1ms
  32          // 1sec = 0.25us * 4000000 = 0.25us * (66*60606)
  33          	Byte i;
  34          	for(i=0 ; i<sec ; i++) Delay(50000);
  35          }
  36          */
  37          
  38          #define	TIME1	(65535-20000)	// 10ms
  39          
  40          void Init_Timer1()
  41          {
  42   1      	TMOD &= 0x0f;
  43   1      	TMOD |= 0x10;	// b'xxxx0001' : Timer1 = mode1, 16-bit timer
  44   1      }
  45          
  46          void Delay_10ms(Byte time)
  47          {
  48   1      // 1/24MHz * 6 x 40000 = 10ms
  49   1      	Init_Timer1();
  50   1      
  51   1      	while(time)
  52   1      	{
  53   2      		TH1 = TIME1/256;
  54   2      		TL1 = TIME1%256;
  55   2      		TF1=0;
  56   2      		TR1=1;
  57   2      		while(!TF1);
  58   2      		TR1=0;
  59   2      		time--;
C51 COMPILER V5.50,  MINEON                                                                06/03/01  11:32:07  PAGE 2   

  60   2      	}
  61   1      }
  62          
  63          void Delay_100ms(Byte time)
  64          {
  65   1      	Init_Timer1();
  66   1      
  67   1      	while(time)
  68   1      	{
  69   2      		Delay_10ms(10);
  70   2      		time--;
  71   2      	}
  72   1      }
  73          
  74          void Delay_Sec(Byte time)
  75          {
  76   1      	Init_Timer1();
  77   1      
  78   1      	while(time)
  79   1      	{
  80   2      		Delay_10ms(100);
  81   2      		time--;
  82   2      	}
  83   1      }
  84          
  85          void Yellow_On()
  86          {
  87   1      	Green_On();
  88   1      	Red_On();
  89   1      }
  90          
  91          void Yellow_Off()
  92          {
  93   1      	Green_Off();
  94   1      	Red_Off();
  95   1      }
  96          
  97          void Red_Light(Byte x, Byte delay)
  98          {
  99   1      	Yellow_Off();
 100   1      	Delay_100ms(delay);
 101   1      	while(x)
 102   1      	{
 103   2      		Red_On();
 104   2      		Delay_100ms(delay);
 105   2      		Red_Off();	
 106   2      		Delay_100ms(delay);
 107   2      		x--;
 108   2      	}
 109   1      }
 110          
 111          void Green_Light(Byte x, Byte delay)
 112          {
 113   1      	Yellow_Off();
 114   1      	Delay_100ms(delay);
 115   1      	while(x)
 116   1      	{
 117   2      		Green_On();
 118   2      		Delay_100ms(delay);
 119   2      		Green_Off();	
 120   2      		Delay_100ms(delay);
 121   2      		x--;
 122   2      	}
 123   1      }
 124          
 125          void Yellow_Light(Byte x, Byte delay)
C51 COMPILER V5.50,  MINEON                                                                06/03/01  11:32:07  PAGE 3   

 126          {
 127   1      	Yellow_Off();
 128   1      	Delay_100ms(delay);
 129   1      	while(x!=0)
 130   1      	{
 131   2      		Yellow_On();
 132   2      		Delay_100ms(delay);
 133   2      		Yellow_Off();
 134   2      		Delay_100ms(delay);
 135   2      		x--;
 136   2      	}
 137   1      }
 138          
 139          
 140          /*
 141          Word Byte2Word(Byte a, Byte b)
 142          {
 143          	return(a*0x100 + b);
 144          }
 145          */
 146          
 147          /*
 148          Dword Byte2Dword(Byte a, Byte b, Byte c, Byte d)
 149          //Dword Byte2Dword(Dword a, Dword b, Dword c, Dword d)
 150          {
 151          //	return((a<<24) + (b<<16) + (c<<8) + d);
 152          	return(a*0x1000000 + b*0x10000 + c*0x100 + d);
 153          }
 154          */
 155          /*
 156          Dword Square( Word x, Byte y )
 157          {
 158          	Byte i;
 159          	Dword z;
 160          
 161          	z = 1;
 162          	for( i=0 ; i<y ; i++)
 163          	{
 164          		z = z*x;
 165          	}
 166          	return(z);
 167          }
 168          */
 169          /*
 170          Byte Dword2Byte(Dword x, Byte i)
 171          {
 172          	Byte y;
 173          	y = x/Square(0x100, i);
 174          	return(y);
 175          }
 176          */
 177          #include <mmu.c>
 178          #include <smc.c>
 179          #include <iic.c>
 180          
 181          void Timer0_Start(Word);
 182          void Start_Power_Off_Time()
 183          {
 184   1      	Timer0_Start(100*60*AUTO_OFF_TIME);
 185   1      //	Timer0_Start(100*10);
 186   1      	Power_Off_Time = 1;
 187   1      }
 188          
 189          #include <command.c>
 190          void Power_Off()
 191          {
C51 COMPILER V5.50,  MINEON                                                                06/03/01  11:32:07  PAGE 4   

 192   1      	Volume_Mute();
 193   1      
 194   1      	MMU_Reset();
 195   1      	DMA_Mode_Off();
 196   1      
 197   1      	Flash_Mem_Read(0,0);
 198   1      
 199   1      	if(Flash_Mem_Erase(0))
 200   1      	{
 201   2      		Write_MMU(1, Volume);
 202   2      		Write_MMU(2, EQ_Mode);
 203   2      
 204   2      		Flash_Mem_Write(0, 0);
 205   2      	}
 206   1      
 207   1      //	VDD_Off();
 208   1      
 209   1      //	Yellow_On();
 210   1      //	Red_Light(2,2);
 211   1      	WSEN_Off();
 212   1      	DCEN_Off();
 213   1      	Power_Down();
 214   1      }
 215          
 216          void Battery_Check()
 217          {
 218   1      /*
 219   1      	if(USB_Checked)
 220   1      	{
 221   1      		if(USB_Connected) return;
 222   1      	}
 223   1      	else
 224   1      	{
 225   1      		if(!USB_Connected) USB_Checked=1;
 226   1      	}
 227   1      */
 228   1      //	return;
 229   1      	if(USB_Connected)
 230   1      	{
 231   2      		Power_Off_Time=0;
 232   2      		return;
 233   2      	}
 234   1      	else
 235   1      	{
 236   2      		BIM_Refreshed=0;
 237   2      		SMC_Refreshed=0;
 238   2      	}
 239   1      
 240   1      	if(~BAT_Check)
 241   1      	{
 242   2      		Red_Light(3,2);
 243   2      		Power_Off();
 244   2      	}
 245   1      }
 246          
 247          void Power_Check()
 248          {
 249   1      	Byte i;
 250   1      
 251   1      	if(DCEN_Check == 0 )
 252   1      	{
 253   2      		for( i=0 ; i<20 ; i++)
 254   2      		{
 255   3      			if(DCEN_Check == 1) return;
 256   3      		}
 257   2      
C51 COMPILER V5.50,  MINEON                                                                06/03/01  11:32:07  PAGE 5   

 258   2      		Red_Light(1,2);
 259   2      		Power_Off();
 260   2      /*
 261   2      CHECK_AGAIN:
 262   2      			while(!DCEN_Check)
 263   2      			{
 264   2      //				Red_Light(1,1);
 265   2      //				Delay_100ms(9);
 266   2      			}
 267   2      
 268   2      			for( i=0 ; i<100 ; i++)
 269   2      			{
 270   2      				if(DCEN_Check == 0) goto CHECK_AGAIN;
 271   2      			}
 272   2      
 273   2      			goto MAIN_START;
 274   2      */
 275   2      	}
 276   1      }
 277          
 278          #include <key.c>
 279          #include <usb.c>
 280          //#include <adc.c>
 281          
 282          
 283          /*
 284          #define	TIME1	(65535-40000)
 285          Bit Time_Err;
 286          Word Time1;
 287          
 288          void Timer1_Start()
 289          {
 290          // 1/4 x 40000 = 10ms
 291          	TMOD &= 0x0f;
 292          	TMOD |= 0x10;	// b'0001xxxx' : Timer1 = mode1, 16-bit counter
 293          	TH1 = TIME1/256;
 294          	TL1 = TIME1%256;
 295          	Time1 = 0;
 296          	TR1 = 1;	// Timer0 start
 297          	ET1 = 1;	// Timer0 interrupt enable
 298          }
 299          
 300          IntTimer1()	interrupt	3
 301          {
 302          	Time1++;
 303          	if(Time1 == 20)	// 10ms x 50 = 0.5sec
 304          	{
 305          		Time1 = 0;
 306          		TH1 = TIME1/256;
 307          		TL1 = TIME1%256;
 308          
 309          		if(Memory==1)
 310          		{
 311          			P10=0;
 312          			return;
 313          		}
 314          		if(P10) {P10=0;} else {P10=1;}
 315          //		ET1 = 0;	// Timer0 interrupt disable
 316          //		return;
 317          	}
 318          }
 319          */
 320          void Next_Block_Search(Byte turn)
 321          {
 322   1      	Byte i;
 323   1      
C51 COMPILER V5.50,  MINEON                                                                06/03/01  11:32:07  PAGE 6   

 324   1      	for(i=0 ; i<turn ; i++)
 325   1      	{
 326   2      		Play_Block = FAT_Read(Play_Block, NEXT_CHECK_LOCATION);
 327   2      		Total_Played_Blocks ++;
 328   2      
 329   2      		if( (Play_Block==LAST_BLOCK) || (Play_Block>=Current_Flash_Mem_Blocks) )
 330   2      		{
 331   3      			Volume_Mute();
 332   3      			File_Num_Inc();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -