亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sccb.lst

?? SCCB協議的KEIL UVISION3的編程源碼。原創
?? LST
?? 第 1 頁 / 共 2 頁
字號:
C51 COMPILER V8.02   SCCB                                                                  01/07/2009 13:14:33 PAGE 1   


C51 COMPILER V8.02, COMPILATION OF MODULE SCCB
OBJECT MODULE PLACED IN sccb.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE sccb.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1           // OmniVision Serial Camera Control Bus (SCCB) Functional File.
   2          //低電平持續時間         最少1,3ns      ------CLK
   3          //高電平持續時間最少為  O。6ns      -----CLK                                                                                                                                    
   4          #include <Reg52.h>
   5          #include <Intrins.h>
   6          #include<stdio.h>
   7          sbit p32=P3^2;
   8          sbit SIO_C=P1^1;
   9          sbit SIO_D=P1^0;
  10          sbit  IO=       P1^2;
  11          //sbit SIO_D=P1^2;
  12          //chip slave ID is 0X42(for write) and 0X43(for read)
  13          #define OV7620_ID  0x42
  14          void serial_init(void)        //改變你需要的位即可!
  15          {
  16   1                       //串口初始化,晶振11.0592Hz,波特率9600
  17   1              SCON = 0x50; // Setup serial port control register 
  18   1                                              // Mode 1: 8-bit uart var. baud rate 
  19   1                                              // REN: enable receiver
  20   1              PCON &= 0x7F; // Clear SMOD bit in power ctrl reg 
  21   1                                              // This bit doubles the baud rate 
  22   1              TMOD &= 0xCF; // Setup timer/counter mode register 
  23   1                                              // Clear M1 and M0 for timer 1 
  24   1              TMOD |= 0x20; //Set M1 for 8-bit autoreload timer 
  25   1              TH1 = 0xFD; // Set autoreload value for timer 1 
  26   1                                              // 9600 baud with 11.0592 MHz xtal 
  27   1              TR1 = 1; // Start timer 1 ->TCON
  28   1          TI = 1; // Set TI to indicate ready to xmit.
  29   1              ES=1;
  30   1              EA=1;
  31   1         }
  32             void delay()
  33          {
  34   1       unsigned char i,j,k;
  35   1        for(i=0;i<10;i++)
  36   1        {
  37   2         for(j=0;j<20;j++)
  38   2         {
  39   3          for(k=0;k<248;k++);
  40   3         }
  41   2        } 
  42   1      }
  43          
  44          void nops(void)          //36us
  45          {
  46   1       //_nop_();
  47   1       //_nop_();
  48   1       //_nop_();
  49   1      // _nop_();
  50   1       //_nop_();
  51   1       _nop_();
  52   1       _nop_();
  53   1       _nop_();
  54   1       _nop_();
  55   1       _nop_();
C51 COMPILER V8.02   SCCB                                                                  01/07/2009 13:14:33 PAGE 2   

  56   1      }
  57          
  58          void hnops(void)
  59          {
  60   1       //_nop_();
  61   1       //_nop_();
  62   1       //_nop_();
  63   1         _nop_();
  64   1         _nop_();
  65   1      }
  66          void OV7620_SCCB_START(void)
  67          {
  68   1         SIO_C=1;
  69   1         nops();
  70   1         SIO_D=1;
  71   1         nops();
  72   1         SIO_D=0;
  73   1         nops();
  74   1         SIO_C=0;  
  75   1         nops();   
  76   1      
  77   1      }
  78          void OV7620_SCCB_END(void)
  79          {
  80   1        //SIO_C=1;
  81   1        //nops();
  82   1         SIO_D=0;
  83   1         nops();
  84   1      // SIO_D=1;
  85   1      // nops();
  86   1         SIO_C=1;
  87   1         nops();
  88   1         SIO_D=1;   
  89   1      
  90   1      }
  91          
  92          bit  OV7620_SCCB_Readbit(void )
  93          {
  94   1         bit temp=0;
  95   1      
  96   1          nops();  
  97   1          SIO_C=1;
  98   1          //input 
  99   1          nops();
 100   1          if(SIO_D)
 101   1          temp =1;
 102   1           nops();
 103   1              SIO_C=0;
 104   1          nops();   
 105   1      //       SBUF=temp;
 106   1      //               delay();
 107   1      
 108   1               return  temp;
 109   1      
 110   1      } 
 111          void  OV7620_SCCB_Writebit(bit a)
 112          {
 113   1          nops();  
 114   1              SIO_D=a;
 115   1          nops();
 116   1               nops();
 117   1          SIO_C=1;
C51 COMPILER V8.02   SCCB                                                                  01/07/2009 13:14:33 PAGE 3   

 118   1          nops();
 119   1          SIO_C=0;
 120   1          nops();      
 121   1      }
 122          
 123          
 124          void OV7620_SCCB_Writechar(unsigned char   b)
 125          {
 126   1               int i = 0; 
 127   1                SBUF=b;
 128   1                       delay(); 
 129   1          /* data */  
 130   1          for (i = 0; i < 8; i++ ) {  
 131   2              OV7620_SCCB_Writebit(b & 0x80);  
 132   2              b <<= 1;  
 133   2          }  
 134   1        
 135   1          /* 9th bit - Don't care */  
 136   1          OV7620_SCCB_Writebit(1);  
 137   1               nops();
 138   1               nops();
 139   1      }
 140          
 141          unsigned char  V7620_SCCB_Readchar( void)
 142          {  
 143   1          char  i;  
 144   1          unsigned char  tmp = 0;  
 145   1          unsigned char  val;
 146   1          bit    l=0;
 147   1               SIO_D=1;
 148   1                nops();
 149   1                 nops();
 150   1          for (i = 7; i >= 0; i--)     //0-255  溢出     沒有報錯    
 151   1              {
 152   2                 l=   OV7620_SCCB_Readbit();
 153   2                  tmp<<=1;
 154   2                 if(l)
 155   2                 {//tmp = tmp | (1<<i);  
 156   3                       tmp=tmp | 0x01;
 157   3                 
 158   3                 } 
 159   2              } 
 160   1      
 161   1              nops();
 162   1          /* 9th bit - N.A. */  
 163   1          OV7620_SCCB_Writebit(1);  
 164   1               nops();
 165   1               nops();
 166   1          val = tmp & 0xff; 
 167   1                return  val;
 168   1      }     
 169          
 170          unsigned char OV7620_Read_SCCB_CMOS(unsigned char DeviceAddress,unsigned char RegisterAddress)
 171          {
 172   1          
 173   1       unsigned char  val=0;
 174   1          //   SBUF=DeviceAddress;
 175   1              //       delay();
 176   1              //       SBUF=RegisterAddress;
 177   1              //       delay();
 178   1      
 179   1        /* 2-phase write */  
C51 COMPILER V8.02   SCCB                                                                  01/07/2009 13:14:33 PAGE 4   

 180   1       OV7620_SCCB_START();        //Start
 181   1       OV7620_SCCB_Writechar(DeviceAddress);
 182   1       OV7620_SCCB_Writechar(RegisterAddress);
 183   1       OV7620_SCCB_END();    //stop
 184   1        nops();
 185   1         nops();
 186   1        /* 2-phase read */  
 187   1       OV7620_SCCB_START();        //Start
 188   1       OV7620_SCCB_Writechar(DeviceAddress | 0X01);
 189   1        val=V7620_SCCB_Readchar();  
 190   1      
 191   1       OV7620_SCCB_END();    //stop
 192   1      
 193   1       return val;
 194   1      }
 195          
 196          void  OV7620_Write_SCCB_COMS(unsigned char DeviceAddress,unsigned char RegisterAddress, unsigned char Writ
             -e_Data)
 197          {
 198   1                /* 3-phase write */  
 199   1       OV7620_SCCB_START();        //Start
 200   1       OV7620_SCCB_Writechar(DeviceAddress);
 201   1       OV7620_SCCB_Writechar(RegisterAddress);
 202   1       OV7620_SCCB_Writechar( Write_Data);
 203   1       OV7620_SCCB_END();    //stop
 204   1      
 205   1      
 206   1      }
 207           //相當于一個二相寫和一個二相讀操作
 208          unsigned char Read_CMOS(unsigned char DeviceAddress,unsigned char RegisterAddress)
 209          {
 210   1       unsigned char  bdata  Buffer_Data;
 211   1      
 212   1       bit Buffer_Data0=Buffer_Data^0;
 213   1       bit Buffer_Data1=Buffer_Data^1;
 214   1       bit Buffer_Data2=Buffer_Data^2;
 215   1       bit Buffer_Data3=Buffer_Data^3;
 216   1       bit Buffer_Data4=Buffer_Data^4;
 217   1       bit Buffer_Data5=Buffer_Data^5;
 218   1       bit Buffer_Data6=Buffer_Data^6;
 219   1       bit Buffer_Data7=Buffer_Data^7;
 220   1      
 221   1       Buffer_Data= 0x42;
 222   1       //printf("write data to register 0x 1c is %x\n",Buffer_Data);
 223   1       F0=0; 
 224   1       //SIO_E=0;
 225   1       //nops();
 226   1      
 227   1       OV7620_SCCB_START();      //Start
 228   1      
 229   1      
 230   1      
 231   1       SIO_D=Buffer_Data7;
 232   1        nops();
 233   1       SIO_C=1;
 234   1       nops();
 235   1       SIO_C=0;
 236   1       nops();         //bit7
 237   1       
 238   1       SIO_D=Buffer_Data6;
 239   1        nops();
 240   1       SIO_C=1;
C51 COMPILER V8.02   SCCB                                                                  01/07/2009 13:14:33 PAGE 5   

 241   1       nops();
 242   1       SIO_C=0;
 243   1       nops();         //bit6
 244   1      
 245   1       SIO_D=Buffer_Data5;
 246   1        nops();
 247   1       SIO_C=1;
 248   1       nops();
 249   1       SIO_C=0;
 250   1       nops();         //bit5
 251   1      
 252   1       SIO_D=Buffer_Data4;
 253   1        nops();
 254   1       SIO_C=1;
 255   1       nops();
 256   1       SIO_C=0;
 257   1       nops();         //bit4
 258   1      
 259   1       SIO_D=Buffer_Data3;
 260   1        nops();
 261   1       SIO_C=1;
 262   1       nops();
 263   1       SIO_C=0;
 264   1       nops();         //bit3
 265   1      
 266   1       SIO_D=Buffer_Data2;
 267   1        nops();
 268   1       SIO_C=1;
 269   1       nops();
 270   1       SIO_C=0;
 271   1       nops();         //bit2
 272   1      
 273   1       SIO_D=Buffer_Data1;
 274   1       SIO_C=1;
 275   1       nops();
 276   1       SIO_C=0;
 277   1       nops();        //bit1
 278   1      
 279   1       SIO_D=Buffer_Data0;
 280   1        nops();
 281   1       SIO_C=1;
 282   1       nops();
 283   1       SIO_C=0;
 284   1       nops();        //bit0
 285   1       SIO_D=1;          // don't care  1
 286   1       nops();
 287   1       nops();
 288   1       nops();
 289   1      
 290   1      
 291   1       SIO_C=1;
 292   1        nops();
 293   1       
 294   1       SIO_C=0;     
 295   1       nops();       
 296   1       //     printf("send DeviceAddress success\n");
 297   1       
 298   1       Buffer_Data=RegisterAddress; 
 299   1       //printf("write data to register 0x 1c is %x\n",Buffer_Data);
 300   1       SIO_D=0;
 301   1        nops();
 302   1       SIO_C=1;
C51 COMPILER V8.02   SCCB                                                                  01/07/2009 13:14:33 PAGE 6   

 303   1       nops();
 304   1       SIO_C=0;
 305   1       nops();         //bit7
 306   1       
 307   1       SIO_D=0;
 308   1        nops();
 309   1       SIO_C=1;
 310   1       nops();
 311   1       SIO_C=0;
 312   1       nops();         //bit6
 313   1      
 314   1       SIO_D=0;
 315   1        nops();
 316   1       SIO_C=1;
 317   1       nops();
 318   1       SIO_C=0;
 319   1       nops();         //bit5
 320   1      
 321   1       SIO_D=1;
 322   1        nops();
 323   1       SIO_C=1;
 324   1       nops();
 325   1       SIO_C=0;
 326   1       nops();         //bit4
 327   1      
 328   1       SIO_D=1;
 329   1        nops();
 330   1       SIO_C=1;
 331   1       nops();
 332   1       SIO_C=0;
 333   1       nops();         //bit3
 334   1      
 335   1       SIO_D=1;
 336   1        nops();
 337   1       SIO_C=1;
 338   1       nops();
 339   1       SIO_C=0;
 340   1       nops();         //bit2
 341   1      
 342   1       SIO_D=0;
 343   1        nops();
 344   1       SIO_C=1;
 345   1       nops();
 346   1       SIO_C=0;
 347   1       nops();        //bit1
 348   1      
 349   1       SIO_D=1;
 350   1        nops();
 351   1       SIO_C=1;
 352   1       nops();
 353   1       SIO_C=0;
 354   1       nops();        //bit0
 355   1       SIO_D=1;        // don't care  0 
 356   1       nops();
 357   1       nops();
 358   1       nops();
 359   1      
 360   1       SIO_C=1;
 361   1        nops();
 362   1       SIO_C=0;     
 363   1       nops();        //check Ack    don't care  1
 364   1      //      printf("send RegisterAddress success\n");
C51 COMPILER V8.02   SCCB                                                                  01/07/2009 13:14:33 PAGE 7   

 365   1      
 366   1      
 367   1       OV7620_SCCB_END();    //stop
 368   1      
 369   1        nops();
 370   1        nops();
 371   1        nops();
 372   1        nops();
 373   1      
 374   1       OV7620_SCCB_START();        //Start
 375   1      
 376   1      
 377   1      Buffer_Data=0X43; // 0x43
 378   1      // printf("write data to register 0x 1c is %x\n",Buffer_Data);
 379   1       SIO_D=0;
 380   1        nops();
 381   1       SIO_C=1;
 382   1       nops();
 383   1       SIO_C=0;
 384   1       nops();         //bit7
 385   1       
 386   1       SIO_D=1;
 387   1        nops();
 388   1       SIO_C=1;
 389   1       nops();
 390   1       SIO_C=0;
 391   1       nops();         //bit6
 392   1      
 393   1       SIO_D=0;
 394   1        nops();
 395   1       SIO_C=1;
 396   1       nops();
 397   1       SIO_C=0;
 398   1       nops();         //bit5
 399   1      
 400   1       SIO_D=0;
 401   1        nops();
 402   1       SIO_C=1;
 403   1       nops();
 404   1       SIO_C=0;
 405   1       nops();         //bit4
 406   1      
 407   1       SIO_D=0;
 408   1        nops();
 409   1       SIO_C=1;
 410   1       nops();
 411   1       SIO_C=0;
 412   1       nops();         //bit3
 413   1      
 414   1       SIO_D=0;
 415   1        nops();
 416   1       SIO_C=1;
 417   1       nops();
 418   1       SIO_C=0;
 419   1       nops();         //bit2
 420   1      
 421   1       SIO_D=1;
 422   1        nops();
 423   1       SIO_C=1;
 424   1       nops();
 425   1       SIO_C=0;
 426   1       nops();        //bit1
C51 COMPILER V8.02   SCCB                                                                  01/07/2009 13:14:33 PAGE 8   

 427   1      
 428   1       SIO_D=1;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91成人国产精品| 日本一区二区三区四区在线视频| 日韩午夜在线播放| 亚洲国产精品99久久久久久久久 | 久久日一线二线三线suv| 国产精品少妇自拍| 免费久久99精品国产| 色老汉一区二区三区| 久久久久青草大香线综合精品| 亚洲一区二区黄色| 国产精品主播直播| 欧美一区二区黄色| 亚洲愉拍自拍另类高清精品| 国产精品99久久久久久久vr | 欧美国产一区视频在线观看| 图片区日韩欧美亚洲| 91色porny| 国产精品网友自拍| 国产资源在线一区| 精品卡一卡二卡三卡四在线| 亚洲观看高清完整版在线观看 | 日本伊人午夜精品| 欧美中文字幕一二三区视频| 国产精品福利一区| 成人中文字幕在线| 欧美激情一区在线观看| 国产一区二区三区高清播放| 日韩欧美国产wwwww| 日本亚洲三级在线| 亚洲天堂2016| 懂色一区二区三区免费观看| 日韩一二三区不卡| 久久国产人妖系列| 精品日韩欧美一区二区| 久久精品国产久精国产爱| 日韩三级.com| 黄页网站大全一区二区| 久久婷婷色综合| 国产美女一区二区| 国产视频一区在线播放| 国产91精品精华液一区二区三区 | 久久久久久久久久久久电影| 久久精品国产色蜜蜜麻豆| 欧美电影免费观看完整版| 精品制服美女丁香| 国产人成一区二区三区影院| 岛国一区二区在线观看| 日韩美女久久久| 精品视频1区2区3区| 日本视频一区二区| 久久欧美中文字幕| 99在线视频精品| 亚洲成人免费av| 欧美videossexotv100| 国产美女精品在线| 国产精品国产三级国产a| 欧美伊人精品成人久久综合97| 日韩激情视频网站| 久久综合色播五月| 91色视频在线| 蜜桃精品在线观看| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产乱子轮精品视频| 国产精品国产馆在线真实露脸 | 国产欧美日韩在线视频| 成年人网站91| 婷婷丁香激情综合| 久久先锋影音av| 欧美影院一区二区三区| 激情综合网天天干| 亚洲激情成人在线| 精品国产三级电影在线观看| 91亚洲永久精品| 久久成人av少妇免费| 亚洲视频免费在线| 欧美一区二区在线免费播放| 国产99精品视频| 日韩中文字幕区一区有砖一区| 久久综合精品国产一区二区三区| 亚洲精品一区二区精华| 97精品视频在线观看自产线路二| 视频在线观看国产精品| 国产精品福利在线播放| 日韩精品一区二区三区四区| 91首页免费视频| 国产一区二区三区免费观看| 亚洲高清不卡在线| 综合久久久久综合| 久久精品人人爽人人爽| 69堂成人精品免费视频| 色综合久久久网| 国产精品香蕉一区二区三区| 日韩精品一卡二卡三卡四卡无卡| 综合在线观看色| 国产三级欧美三级日产三级99 | 成人免费视频一区| 另类小说视频一区二区| 亚洲成av人影院在线观看网| 中文字幕在线观看一区二区| 久久精品无码一区二区三区| 日韩欧美一区二区三区在线| 欧美日韩午夜在线视频| 在线一区二区视频| 91伊人久久大香线蕉| 成人精品国产一区二区4080| 九色|91porny| 久久激情五月婷婷| 免费看日韩精品| 丝袜美腿一区二区三区| 亚洲国产aⅴ天堂久久| 亚洲综合激情网| 亚洲精品一二三四区| 亚洲视频在线一区二区| 国产精品欧美一区喷水| 欧美激情一区在线| 国产性色一区二区| 国产人久久人人人人爽| 欧美激情艳妇裸体舞| 亚洲黄色尤物视频| 亚洲在线视频一区| 亚洲伊人色欲综合网| 亚洲午夜电影在线观看| 午夜视频一区在线观看| 日韩黄色片在线观看| 蜜臀99久久精品久久久久久软件| 视频一区二区不卡| 久久er精品视频| 国产一区福利在线| 成人综合在线观看| 一本久久a久久精品亚洲| 在线亚洲免费视频| 在线观看91精品国产麻豆| 777午夜精品视频在线播放| 日韩亚洲欧美一区二区三区| 久久综合五月天婷婷伊人| 久久精品人人做人人爽人人| 日韩一区中文字幕| 亚洲成av人**亚洲成av**| 青青草97国产精品免费观看| 精品在线你懂的| 成人免费va视频| 91国偷自产一区二区三区观看| 欧美日韩国产不卡| 精品国产99国产精品| 中文字幕一区二区日韩精品绯色| 亚洲最快最全在线视频| 蜜桃av噜噜一区| 成人激情av网| 在线成人免费视频| 精品国产乱码久久久久久夜甘婷婷 | 成人小视频免费在线观看| 在线观看视频91| 久久夜色精品一区| 亚洲美女淫视频| 国产一区二区三区精品视频| 色综合天天做天天爱| 日韩欧美在线综合网| 成人欧美一区二区三区白人 | 亚洲一区欧美一区| 精品中文字幕一区二区小辣椒 | 国产一区二区视频在线播放| 97超碰欧美中文字幕| 欧美变态凌虐bdsm| 亚洲裸体xxx| 国产一区二区不卡| 欧美美女激情18p| ●精品国产综合乱码久久久久| 青青草成人在线观看| 色天使久久综合网天天| 久久欧美一区二区| 蜜桃av一区二区| 欧美日韩免费一区二区三区| 国产精品毛片大码女人| 久久99深爱久久99精品| 精品视频一区二区不卡| 国产精品短视频| 国产一区二区在线视频| 欧美绝品在线观看成人午夜影视| 自拍视频在线观看一区二区| 国产麻豆精品视频| 日韩免费电影网站| 午夜激情一区二区三区| 在线免费观看一区| 中文字幕在线观看不卡视频| 国产在线不卡一卡二卡三卡四卡| 欧美精品xxxxbbbb| 亚洲一区二区三区四区五区黄| 成人av在线网站| 欧美激情综合五月色丁香 | 亚洲成a人在线观看| 99国产精品久久久久久久久久| 国产亚洲欧美日韩在线一区| 青青草97国产精品免费观看 | 成人av影院在线| 国产亚洲精品中文字幕| 国内精品国产成人| 精品理论电影在线| 国内精品久久久久影院薰衣草| 日韩三级在线观看| 国产在线精品一区在线观看麻豆|