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

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

StRing-include

  • PCA9555 16bit I2C-bus and SMBu

    The PCA9555 is a 24-pin CMOS device that provides 16 bits of General Purpose parallelInput/Output (GPIO) expansion for I2C-bus/SMBus applications and was developed toenhance the NXP Semiconductors family of I2C-bus I/O expanders. The improvementsinclude higher drive capability, 5 V I/O tolerance, lower supply current, individual I/Oconfiguration, and smaller packaging. I/O expanders provide a simple solution whenadditional I/O is needed for ACPI power switches, sensors, push buttons, LEDs, fans, etc.The PCA9555 consists of two 8-bit Configuration (Input or Output selection); Input, Outputand Polarity Inversion (active HIGH or active LOW operation) registers. The systemmaster can enable the I/Os as either inputs or outputs by writing to the I/O configurationbits. The data for each Input or Output is kept in the corresponding Input or Outputregister. The polarity of the read register can be inverted with the Polarity Inversionregister. All registers can be read by the system master. Although pin-to-pin and I2C-busaddress compatible with the PCF8575, software changes are required due to theenhancements, and are discussed in Application Note AN469.

    標簽: C-bus 9555 SMBu PCA

    上傳時間: 2013-11-13

    上傳用戶:fredguo

  • 可編程自動控制控制跑馬燈

    這一顆,我們學習如何讓跑馬燈自動按照我們預定的順序進行。這種控制在工控場合經常用到。這個程序里,我們預先定義了一個變化的順序speedcode,每跑一圈燈就根據預定設置的表格數據來決定下一圈的跑馬速度。這樣我們就實現了按照預定的順序自動變化運行。請看代碼:-----------------------------------#define uchar unsigned char //定義一下方便使用#define uint unsigned int#define ulong unsigned long#include <reg52.h> //包括一個52 標準內核的頭文件sbit P10 = P1^0; //頭文件中沒有定義的IO 就要自己來定義了sbit P11 = P1^1;sbit P12 = P1^2;sbit P13 = P1^3;bit ldelay=0; //長定時溢出標記,預置是0uchar speed=10; //設置一個變量保存跑馬燈的移動速度uchar code speedcode[10]={3,1,5,12,3,20,2,10,1,4}; //10 個預定義的速度char code dx516[3] _at_ 0x003b;//這是為了仿真設置的//可編程自動控制跑馬燈void main(void) // 主程序{uchar code ledp[4]={0xfe,0xfd,0xfb,0xf7};//預定的寫入P1 的值uchar ledi; //用來指示顯示順序uchar i;RCAP2H =0x10; //賦T2 的預置值0x1000,溢出30 次就是1 秒鐘RCAP2L =0x00;TR2=1; //啟動定時器ET2=1; //打開定時器2 中斷EA=1; //打開總中斷

    標簽: 可編程 自動控制 控制 跑馬燈

    上傳時間: 2013-11-20

    上傳用戶:ming529

  • 數字鐘顯示電路

    SHUZIZHONG顯示電路 源程序如下: #include <reg51.h>#include <intrins.h> unsigned char data dis_digit; unsigned char code dis_code[]={ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};unsigned char data dis_buf[16];unsigned char data dis_index;char hour,min,sec,wang,year,mouth,day;unsigned char sec100;

    標簽: 數字 顯示電路

    上傳時間: 2013-11-24

    上傳用戶:fdmpy

  • MPC106 PCI Bridge/Memory Contr

    In this document, the term Ô60xÕ is used to denote a 32-bit microprocessor from the PowerPC architecture family that conforms to the bus interface of the PowerPC 601ª, PowerPC 603ª, or PowerPC 604 microprocessors. Note that this does not include the PowerPC 602ª microprocessor which has a multiplexed address/data bus. 60x processors implement the PowerPC architecture as it is speciÞed for 32-bit addressing, which provides 32-bit effective (logical) addresses, integer data types of 8, 16, and 32 bits,and ßoating-point data types of 32 and 64 bits (single-precision and double-precision).1.1 Overview The MPC106 provides an integrated high-bandwidth, high-performance, TTL-compatible interface between a 60x processor, a secondary (L2) cache or additional (up to four total) 60x processors, the PCI bus,and main memory. This section provides a block diagram showing the major functional units of the 106 and describes brießy how those units interact.Figure 1 shows the major functional units within the 106. Note that this is a conceptual block diagram intended to show the basic features rather than an attempt to show how these features are physically implemented on the device.

    標簽: Bridge Memory Contr MPC

    上傳時間: 2013-10-08

    上傳用戶:18711024007

  • DS1302+AT89S52+LED時鐘程序(C語言源代碼+

    #include<reg51.h>/*************************ds1302與at89s52引腳連接********************/sbit T_RST=P3^5; sbit T_CLK=P3^6;                 sbit T_IO=P3^7;                                sbit ACC0=ACC^0;sbit ACC7=ACC^7;unsigned char seg[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09};         //0~~9段碼 /******************DS1302:寫入操作(上升沿)*********************/ void write_byte(unsigned char da){   unsigned char i;   ACC=da;   for(i=8;i>0;i--)   {       T_IO=ACC0;   T_CLK=0;           T_CLK=1;      ACC=ACC>>1;   }} /******************DS1302:讀取操作(下降沿)*****************/unsigned char read_byte(void){   unsigned char i;   for(i=0;i<8;i++)   {      ACC=ACC>>1;   T_CLK = 1;   T_CLK = 0;      ACC7 = T_IO;   }   return(ACC); } /******************DS1302:寫入數據(先送地址,再寫數據)***************************/ void write_1302(unsigned char addr,unsigned char da){   T_RST=0;    //停止工作   T_CLK=0;                                    T_RST=1;   //重新工作   write_byte(addr);    //寫入地址      write_byte(da);   T_RST=0;   T_CLK=1;}

    標簽: 1302 LED DS AT

    上傳時間: 2014-01-17

    上傳用戶:sglccwk

  • 串行編程器源程序(Keil C語言)

    串行編程器源程序(Keil C語言)//FID=01:AT89C2051系列編程器//實現編程的讀,寫,擦等細節//AT89C2051的特殊處:給XTAL一個脈沖,地址計數加1;P1的引腳排列與AT89C51相反,需要用函數轉換#include <e51pro.h> #define C2051_P3_7 P1_0#define C2051_P1 P0//注意引腳排列相反#define C2051_P3_0  P1_1#define C2051_P3_1 P1_2#define C2051_XTAL P1_4#define C2051_P3_2 P1_5#define C2051_P3_3 P1_6#define C2051_P3_4 P1_7#define C2051_P3_5 P3_5 void InitPro01()//編程前的準備工作{ SetVpp0V(); P0=0xff; P1=0xff; C2051_P3_5=1; C2051_XTAL=0; Delay_ms(20); nAddress=0x0000; SetVpp5V();} void ProOver01()//編程結束后的工作,設置合適的引腳電平{ SetVpp5V(); P0=0xff; P1=0xff; C2051_P3_5=1; C2051_XTAL=1;} BYTE GetData()//從P0口獲得數據{ B_0=P0_7; B_1=P0_6; B_2=P0_5; B_3=P0_4; B_4=P0_3; B_5=P0_2; B_6=P0_1; B_7=P0_0; return B;} void SetData(BYTE DataByte)//轉換并設置P0口的數據{ B=DataByte; P0_0=B_7; P0_1=B_6; P0_2=B_5; P0_3=B_4; P0_4=B_3; P0_5=B_2; P0_6=B_1; P0_7=B_0;} void ReadSign01()//讀特征字{ InitPro01(); Delay_ms(1);//----------------------------------------------------------------------------- //根據器件的DataSheet,設置相應的編程控制信號 C2051_P3_3=0; C2051_P3_4=0; C2051_P3_5=0; C2051_P3_7=0; Delay_ms(20); ComBuf[2]=GetData(); C2051_XTAL=1; C2051_XTAL=0; Delay_us(20); ComBuf[3]=GetData(); ComBuf[4]=0xff;//----------------------------------------------------------------------------- ProOver01();} void Erase01()//擦除器件{ InitPro01();//----------------------------------------------------------------------------- //根據器件的DataSheet,設置相應的編程控制信號 C2051_P3_3=1; C2051_P3_4=0; C2051_P3_5=0; C2051_P3_7=0; Delay_ms(1); SetVpp12V(); Delay_ms(1); C2051_P3_2=0; Delay_ms(10); C2051_P3_2=1; Delay_ms(1);//----------------------------------------------------------------------------- ProOver01();} BOOL Write01(BYTE Data)//寫器件{//----------------------------------------------------------------------------- //根據器件的DataSheet,設置相應的編程控制信號 //寫一個單元 C2051_P3_3=0; C2051_P3_4=1; C2051_P3_5=1; C2051_P3_7=1; SetData(Data); SetVpp12V(); Delay_us(20); C2051_P3_2=0; Delay_us(20); C2051_P3_2=1; Delay_us(20); SetVpp5V(); Delay_us(20); C2051_P3_4=0; Delay_ms(2); nTimeOut=0; P0=0xff; nTimeOut=0; while(!GetData()==Data)//效驗:循環讀,直到讀出與寫入的數相同 {  nTimeOut++;  if(nTimeOut>1000)//超時了  {   return 0;  } } C2051_XTAL=1; C2051_XTAL=0;//一個脈沖指向下一個單元//----------------------------------------------------------------------------- return 1;} BYTE Read01()//讀器件{ BYTE Data;//----------------------------------------------------------------------------- //根據器件的DataSheet,設置相應的編程控制信號 //讀一個單元 C2051_P3_3=0; C2051_P3_4=0; C2051_P3_5=1; C2051_P3_7=1; Data=GetData(); C2051_XTAL=1; C2051_XTAL=0;//一個脈沖指向下一個單元//----------------------------------------------------------------------------- return Data;} void Lock01()//寫鎖定位{ InitPro01();//先設置成編程狀態//----------------------------------------------------------------------------- //根據器件的DataSheet,設置相應的編程控制信號 if(ComBuf[2]>=1)//ComBuf[2]為鎖定位 {  C2051_P3_3=1;  C2051_P3_4=1;  C2051_P3_5=1;  C2051_P3_7=1;  Delay_us(20);  SetVpp12V();  Delay_us(20);  C2051_P3_2=0;  Delay_us(20);  C2051_P3_2=1;  Delay_us(20);  SetVpp5V(); } if(ComBuf[2]>=2) {  C2051_P3_3=1;  C2051_P3_4=1;  C2051_P3_5=0;  C2051_P3_7=0;  Delay_us(20);  SetVpp12V();  Delay_us(20);  C2051_P3_2=0;  Delay_us(20);  C2051_P3_2=1;  Delay_us(20);  SetVpp5V(); }//----------------------------------------------------------------------------- ProOver01();} void PreparePro01()//設置pw中的函數指針,讓主程序可以調用上面的函數{ pw.fpInitPro=InitPro01; pw.fpReadSign=ReadSign01; pw.fpErase=Erase01; pw.fpWrite=Write01; pw.fpRead=Read01; pw.fpLock=Lock01; pw.fpProOver=ProOver01;}

    標簽: Keil 串行 C語言 編程器

    上傳時間: 2013-11-12

    上傳用戶:gut1234567

  • 用C51寫的普通拼音輸入法源程序代碼

    用C51寫的普通拼音輸入法源程序代碼:原作使用了一個二維數組用以查表,我認為這樣比較的浪費空間,而且每個字表的索引地址要手工輸入,效率不高。所以我用結構體將其改寫了一下。就是大家現在看到的這個。  因為代碼比較的大,共有6,000多漢字,這樣就得要12,000 byte來存放GB內碼,所以也是沒辦法的.編譯結果約為3000h,因為大部分是索引表,代碼優化幾乎無效。    在Keil C里仿真芯片選用的是華邦的W77E58,它有32k ROM, 256B on-chip RAM, 1K on-chip SRAM (用DPTR1指針尋址,相當于有1K的片上xdata)。條件有限,沒有上片試驗,仿真而已。  打算將其移植到AVR上,但CodeAVRC與IAR EC++在結構體、指針的定義使用上似乎與C51不太一樣,現在還未搞定。還希望在這方面有經驗的網友能給予指導。 #include<stdio.h> char * py_ime(char *); void main(void){ while(1)    {     char input_string[]="yI";     xdata char chinese_string[255];     sprintf(chinese_string,"%s",py_ime(input_string));    }}

    標簽: C51 拼音輸入法 代碼 源程序

    上傳時間: 2013-10-30

    上傳用戶:cainaifa

  • 采用18b20芯片的溫度測量C51源程序

    #include <reg51.h>#include<intrins.h> #define   BUSY1    (DQ1==0) sbit      DQ1    =  P0^4; unsigned char idata TMP; unsigned char idata TMP_d; unsigned char f; void wr_ds18_1(char dat);unsigned char rd_ds18_1(); /***************延時程序,單位us,大于10us*************/void time_delay(unsigned char time){   time=time-10;  time=time/6;  while(time!=0)time--;} /*****************************************************//*                reset ds18b20                      *//*****************************************************/void ds_reset_1(void){  unsigned char idata count=0;    DQ1=0;   time_delay(240); time_delay(240);  DQ1=1;  return;}

    標簽: 18b20 C51 芯片 溫度測量

    上傳時間: 2013-10-29

    上傳用戶:sssnaxie

  • 24c01a的讀寫程序

    #include <at24c01a.h>/*************************************************向24C01A寫入一個字節輸入:E2ROM地址,字節數據******************************************************/void write24c01a(uchar uadd_1,uchar udata_1){sendbyte=0xa0;start();send(sendbyte);if (!ack())continue;send(uadd_1);if (!ack())continue;send(udata_1)if (!ack())continue;stop();}/**********************************發送開始*****************************************/void start(void){a_scl=1;a_sda=1;a_sda=0;a_scl=0;a_scl=1;}/********************************************發送停止*******************************************/void stop(void){a_scl=0;a_sda=0;a_scl=1;a_sda=1;} /*********************************************發送反饋************************************************/bit ack(void){int a_acka_scl=0;a_scl=0;a_scl=0;a_scl=1;a_ack=a_sda;a_scl=0;return(a_ack)}/**************************************發送無反饋********************************************/bit noack(void){int a_ack;a_scl=1;a_scl=1;a_scl=0;}/*******************************************發送****************************************************/void send(uchar  undata){uchar i;sendbyte=undatafor(i=8;i>0;i--){a_sda=sendbyte7;a_scl=0;a_scl=1;sendbyte=sendbyte<<1}}/********************************************接受****************************************************/ void   receive(void){int i;uchar data;for(i=8;i>0;i--){ a_scl=1;receivebyte7=a_sda;a_scl=0;receivebyte=receivebyte>>1}receivedata=receivebyte;}/********************************************向 24c01a讀一個字節;輸入:EEROM地址;輸出:EEROM數據;********************************************/void read24c01a(uchar  counter){receivebyte=0xa1;start();send(receivebyte);if (!ack())continue;send(counter);if (!ack())continue;receive()noack();stop();}

    標簽: 24c01a 讀寫程序

    上傳時間: 2013-12-23

    上傳用戶:wxhwjf

  • RD系列微型打印機打印實例

    C51控制并口打印機實例:/* 沈陽新榮達電子 *//* 2004-12-7 */#include <reg52.h>#define uchar unsigned char#define uint unsigned int#define data_8 P0sbit BUSY = P1^2; //打印機 BUSY 接P1.2sbit STB = P1^0; //打印機 STB 接P1.0void print(uchar j) //打印子程序{ uchar i;while(BUSY){}; //BUSY=1,打印機忙,等待BUSY 為0 再發數data_8=j;STB=0;i++;i--;STB=1; //給出數據鎖存時鐘BUSY=1;}void main(void){BUSY = 1; //忙信號置高STB = 1; //選通信號置高print(0x1b); //打印機初始化命令print(0x38);print(0x04);for(;;){print(0xd0); //發送漢字內碼“新榮達”print(0xc2);print(0xc8);print(0xd9);print(0xb4);print(0xef);print(0x0d); //換行}}

    標簽: 微型打印機 打印

    上傳時間: 2013-11-13

    上傳用戶:lwq11

主站蜘蛛池模板: 博兴县| 得荣县| 滦平县| 桓台县| 徐汇区| 鄢陵县| 镇安县| 桑日县| 新晃| 射阳县| 丹江口市| 南岸区| 遵义县| 霞浦县| 阿坝| 阿克苏市| 屏东市| 合肥市| 麦盖提县| 滕州市| 巫溪县| 鄯善县| 龙游县| 贵德县| 香港| 阿荣旗| 祁东县| 桂东县| 咸宁市| 玉林市| 万宁市| 宜春市| 云霄县| 卓资县| 屏东县| 调兵山市| 崇信县| 富宁县| 赞皇县| 逊克县| 贵港市|