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

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

int

  • 24c01a的讀寫程序

    #include <at24c01a.h>/*************************************************向24C01A寫入一個(gè)字節(jié)輸入:E2ROM地址,字節(jié)數(shù)據(jù)******************************************************/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();}/**********************************發(fā)送開始*****************************************/void start(void){a_scl=1;a_sda=1;a_sda=0;a_scl=0;a_scl=1;}/********************************************發(fā)送停止*******************************************/void stop(void){a_scl=0;a_sda=0;a_scl=1;a_sda=1;} /*********************************************發(fā)送反饋************************************************/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)}/**************************************發(fā)送無反饋********************************************/bit noack(void){int a_ack;a_scl=1;a_scl=1;a_scl=0;}/*******************************************發(fā)送****************************************************/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讀一個(gè)字節(jié);輸入:EEROM地址;輸出:EEROM數(shù)據(jù);********************************************/void read24c01a(uchar  counter){receivebyte=0xa1;start();send(receivebyte);if (!ack())continue;send(counter);if (!ack())continue;receive()noack();stop();}

    標(biāo)簽: 24c01a 讀寫程序

    上傳時(shí)間: 2013-12-23

    上傳用戶:wxhwjf

  • 24c16讀寫驅(qū)動(dòng)程序

    24c16讀寫驅(qū)動(dòng)程序,//=-------------------------------------------------------------------------------/*模塊調(diào)用:讀數(shù)據(jù):read(unsigned int address)寫數(shù)據(jù):write(unsigned int address,unsigned char dd)   dd為要寫的 數(shù)據(jù)字節(jié)*///------------------------------------------------------------------------------ sbit sda=P3^0;sbit scl=P3^1; sbit a0=ACC^0;                  //定義ACC的位,利用ACC操作速度最快sbit a1=ACC^1;sbit a2=ACC^2;sbit a3=ACC^3;sbit a4=ACC^4;sbit a5=ACC^5;sbit a6=ACC^6;sbit a7=ACC^7; //------------------------------------------------------------------------------#pragma disablevoid s24(void)                 //起始函數(shù){_nop_();    scl=0;     sda=1;    scl=1;    _nop_();    sda=0;    _nop_();    _nop_();    scl=0;     _nop_();    _nop_();    sda=1;} //------------------------------------------------------------------------------#pragma disablevoid p24(void)                 //停止函數(shù){sda=0;    scl=1;    _nop_();    _nop_();    sda=1;} //-----------------------------------------------------------------------------#pragma disableunsigned char rd24(void) /////////////////從24c16讀一字節(jié)數(shù)據(jù){       ACC=0x00;sda=1;scl=1;a7=sda;_nop_();_nop_();_nop_();_nop_();scl=0;scl=1;a6=sda;_nop_();_nop_();_nop_();_nop_();scl=0;scl=1;a5=sda;_nop_();_nop_();_nop_();_nop_();scl=0;scl=1;a4=sda;_nop_();_nop_();_nop_();_nop_();scl=0;scl=1;a3=sda;_nop_();_nop_();_nop_();_nop_();scl=0;scl=1;a2=sda;_nop_();_nop_();_nop_();_nop_();scl=0;scl=1;a1=sda;_nop_();_nop_();_nop_();_nop_();scl=0;scl=1;a0=sda;_nop_();_nop_();_nop_();_nop_();scl=0;sda=1;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0; /// ///////////////24c16的一位回答位。return(ACC);}//------------------------------------------------------------------------------#pragma disablevoid wd24(unsigned char dd) ////////////////向24c16寫一字節(jié)數(shù)據(jù){      sda=1;ACC=dd;sda=a7;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0;sda=a6;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0;sda=a5;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0;sda=a4;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0;sda=a3;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0;sda=a2;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0;sda=a1;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0;sda=a0;scl=1;_nop_();_nop_();_nop_();_nop_();scl=0;sda=0;scl=1;//scl=0;(在下面程序中)}//---------------------------------------------------------------------------#pragma disableunsigned char read(unsigned int address){unsigned char dd;    s24();                        ////////////////////////開始條件    wd24(0xa0);                /////////////////////////寫器件地址(寫命令)     _nop_();_nop_();_nop_();_nop_();      scl=0;                        ///////////////////////////////////接收器件地址確認(rèn)信號(hào)    wd24(address);                //////////////////////////// 寫數(shù)據(jù)地址    _nop_();_nop_();_nop_();_nop_();    scl=0;s24();                             ///////////////////////////////////開始條件    wd24(0xa1);                 /////////////////////////////寫器件地址(讀命令)    scl=0;    dd=rd24();              //////////////////////////////////讀 一字節(jié)    p24();                   ////////////////////////////////////停止條件    return(dd);}//------------------------------------------------------------------------------#pragma disablevoid write(unsigned int address,unsigned char dd){s24();                        /////////////////開始條件    wd24(0xa0);            ////////////////////////寫器件地址;    scl=0;     wd24(address);              /////////////////////寫數(shù)據(jù)地址    scl=0;    wd24(dd);                  //////////////////////////寫dd數(shù)據(jù)    scl=0;    p24();                      /////////////////////////停止條件;  }          

    標(biāo)簽: 24c16 讀寫 驅(qū)動(dòng)程序

    上傳時(shí)間: 2013-11-18

    上傳用戶:墻角有棵樹

  • RD系列微型打印機(jī)打印實(shí)例

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

    標(biāo)簽: 微型打印機(jī) 打印

    上傳時(shí)間: 2013-11-13

    上傳用戶:lwq11

  • 微型打印機(jī)的C語言源程序

    微型打印機(jī)的C語言源程序:微型打印機(jī)的C51源程序#define uchar unsigned char#define uint unsigned int#include <reg52.h>#include <stdio.h>#include <absacc.h>#include <math.h>#include <string.h>#include <ctype.h>#include <stdlib.h>#define PIN XBYTE[0x8000]#define POUT XBYTE[0x9000]sbit PRintSTB =P1^6;sbit DOG=P1^7;bdata char pin&#118alue;sbit PRintBUSY=pin&#118alue^7;sbit PRintSEL =pin&#118alue^6;sbit PRintERR =pin&#118alue^5;sbit PRintACK =pin&#118alue^4;  void PrintString(uchar *String1,uchar *String2);void initprint(void);void print(uchar a);  void initprint(void) //打印機(jī)初始化子程序 {  pin&#118alue=PIN;  if((PRintSEL==1)&&(PRintERR==1))  {    print(0x1b); print(0x40); print(0x1b); print(0x38); print(0x4);  }}void print(uchar a) //打印字符a{  pin&#118alue=PIN;  if((PRintSEL==0)||(PRintERR==0)) return;  for(;;) {    DOG=~DOG;    pin&#118alue=PIN;    if(PRintBUSY==0) break;  }  DOG=~DOG;  POUT=a;  PRintSTB=1;  PRintSTB=1;  PRintSTB=1;  PRintSTB=1;  PRintSTB=0;  PRintSTB=0;  PRintSTB=0;  PRintSTB=0;  PRintSTB=1;}void PrintString(uchar *String) //打印字符串后回車{  uchar CH;  for (;;) {   DOG=~DOG;   CH=*String;   if (CH==0) { print(0x0d); break; }   print(CH);   String++;  }  initprint();}

    標(biāo)簽: 微型打印機(jī) C語言 源程序

    上傳時(shí)間: 2013-10-18

    上傳用戶:hasan2015

  • 16 16點(diǎn)陣顯示漢字原理及顯示程序

    16 16點(diǎn)陣顯示漢字原理及顯示程序 #include "config.h" #define                DOTLED_LINE_PORT        PORTB #define                DOTLED_LINE_DDR                DDRB #define                DOTLED_LINE_PIN                PINB #define                DOTLED_LINE_SCKT        PB1 #define                DOTLED_LINE_SCKH        PB5 #define                DOTLED_LINE_SDA                PB3 #define                DOTLED_ROW_PORT                PORTC #define                DOTLED_ROW_DDR                DDRC #define                DOTLED_ROW_PIN                PINC #define                DOTLED_ROW_A0                PC0 #define                DOTLED_ROW_A1                PC1 #define                DOTLED_ROW_A2                PC2 #define                DOTLED_ROW_A3                PC3 #define                DOTLED_ROW_E                PC4 uint8 font[] = { /*--  調(diào)入了一幅圖像:這是您新建的圖像  --*/ /*--  寬度x高度=16x16  --*/ 0x00,0x00,0x00,0x00,0x08,0x38,0x18,0x44,0x08,0x44,0x08,0x04,0x08,0x08,0x08,0x10, 0x08,0x20,0x08,0x40,0x08,0x40,0x08,0x40,0x3E,0x7C,0x00,0x00,0x00,0x00,0x00,0x00 }; static void TransmitByte(uint8 byte); static void SelectRow(uint8 row); static void FlipLatchLine(void); static void TransmitByte(uint8 byte) {         uint8 i;                  for(i = 0 ; i < 8 ; i ++)         {                 if(byte & (1 << i))                 {                         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA);                 }                 else                 {                         DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SDA);                 }                 //__delay_cycles(100);                 DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKH);                 //__delay_cycles(100);                 DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKH);                 //__delay_cycles(100);         } } static void SelectRow(uint8 row) {           //row -= 1;         row |= DOTLED_ROW_PIN & 0xe0;         DOTLED_ROW_PORT = row; } static void FlipLatchLine(void) {         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKT);         DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKT); } void InitDotLedPort(void) {         DOTLED_LINE_PORT &= ~(_BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH));         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA);         DOTLED_LINE_DDR |= _BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH) | _BV(DOTLED_LINE_SDA);                  DOTLED_ROW_PORT |= 0x1f;         DOTLED_ROW_PORT &= 0xf0;         DOTLED_ROW_DDR |= 0x1f; } void EnableRow(boolean IsEnable) {         if(IsEnable)         {                 DOTLED_ROW_PORT &= ~_BV(DOTLED_ROW_E);         }         else         {                 DOTLED_ROW_PORT |= _BV(DOTLED_ROW_E);         } } void PrintDotLed(uint8 * buffer) {         uint8 i , tmp;                  for(i = 0 ; i < 16 ; i ++)         {                 tmp = *buffer ++;                 TransmitByte(~tmp);                 tmp = *buffer ++;                 TransmitByte(~tmp);                 SelectRow(i);                 FlipLatchLine();         } } void main(void) {         InitDotLedPort();                  EnableRow(TRUE);                  while(1)         {                 PrintDotLed(font);                 __delay_cycles(5000);         }          } //---------------------------------------------------- config.h文件 #ifndef        _CONFIG_H #define        _CONFIG_H //#define                GCCAVR #define                CPU_CYCLES        7372800L #ifndef                GCCAVR #define                _BV(bit)        (1 << (bit)) #endif #define                MSB                0x80 #define                LSB                0x01 #define                FALSE                0 #define                TRUE                1 typedef                unsigned char        uint8; typedef                unsigned int        uint16; typedef                unsigned long        uint32; typedef                unsigned char        boolean; #include <ioavr.h> #include <inavr.h> #include "dotled.h" #endif //-----

    標(biāo)簽: 16 點(diǎn)陣顯示 漢字 顯示程序

    上傳時(shí)間: 2013-11-18

    上傳用戶:mnacyf

  • 51單片機(jī)驅(qū)動(dòng)步進(jìn)電機(jī)(含電路圖和C語言源程序代碼)

    51單片機(jī)驅(qū)動(dòng)步進(jìn)電機(jī)(含電路圖和源程序代碼) 源程序:stepper.c stepper.hex /* * STEPPER.C * sweeping stepper's rotor cw and cww 400 steps * Copyright (c) 1999 by W.Sirichote */ #i nclude c:\mc5151io.h /* include i/o header file */ #i nclude c:\mc5151reg.h register unsigned char j,flag1,temp; register unsigned int cw_n,ccw_n; unsigned char step[8]={0x80,0xc0,0x40,0x60,0x20,0x30,0x10,0x90} #define n 400 /* flag1 mask byte 0x01 run cw() 0x02 run ccw() */

    標(biāo)簽: 51單片機(jī) 驅(qū)動(dòng) 步進(jìn)電機(jī) C語言

    上傳時(shí)間: 2013-11-09

    上傳用戶:釣鰲牧馬

  • I2C總線驅(qū)動(dòng)程序

    1 /**————————————————————2 〖說明〗I2C總線驅(qū)動(dòng)程序(用兩個(gè)普通IO模擬I2C總線)3 包括100Khz(T=10us)的標(biāo)準(zhǔn)模式(慢速模式)選擇,4 和400Khz(T=2.5us)的快速模式選擇,5 默認(rèn)11.0592Mhz的晶振。6 〖文件〗PCF8563T.C ﹫2001/11/2 77 〖作者〗龍嘯九天 c51@yeah.net http://www.c51bbs.co /8 〖修改〗修改建議請到論壇公布 http://www.c51bbs.co m9 〖版本〗V1.00A Build 080310 —————————————————————*/1112 #ifndef SDA13 #define SDA P0_014 #define SCL P0_115 #endif1617 extern uchar SystemError;1819 #define uchar unsigned char20 #define uint unsigned int21 #define Byte unsigned char22 #define Word unsigned int23 #define bool bit24 #define true 125 #define false 02627 #define SomeNOP(); _nop_();_nop_();_nop_();_nop_();2829 /**--------------------------------------------------------------------------------30 調(diào)用方式:void I2CStart(void) ﹫2001/07/0 431 函數(shù)說明:私有函數(shù),I2C專用32 ---------------------------------------------------------------------------------*/33 void I2CStart(void)34 {35 EA=0;36 SDA=1; SCL=1; SomeNOP();//INI37 SDA=0; SomeNOP(); //START38 SCL=0;39 }4041 /**--------------------------------------------------------------------------------42 調(diào)用方式:void I2CStop(void) ﹫2001/07/0 443 函數(shù)說明:私有函數(shù),I2C專用44 ---------------------------------------------------------------------------------*/45 void I2CStop(void)46 {47 SCL=0; SDA=0; SomeNOP(); //INI48 SCL=1; SomeNOP(); SDA=1; //STOP49 EA=1;50 }5152 /**--------------------------------------------------------------------------------53 調(diào)用方式:bit I2CAck(void) ﹫2001/07/0 454 函數(shù)說明:私有函數(shù),I2C專用,等待從器件接收方的應(yīng)答55 ---------------------------------------------------------------------------------*/56 bool WaitAck(void)57 {58 uchar errtime=255;//因故障接收方無ACK,超時(shí)值為255。59 SDA=1;SomeNOP();60 SCL=1;SomeNOP();61 while(SDA) {errtime--; if (!errtime) {I2CStop();SystemError=0x11;return false;}}62 SCL=0;63 return true;

    標(biāo)簽: I2C 總線 驅(qū)動(dòng)程序

    上傳時(shí)間: 2014-04-11

    上傳用戶:xg262122

  • C51單片機(jī)模擬I2C總線的C語言實(shí)現(xiàn)

    EEPROM為ATMEL公司的AT24C01A。單片機(jī)為ATMEL公司的AT89C51。2. 軟件說明 C語言為Franklin C V3.2。將源程序另存為testi2c.c,用命令C51 testi2c.cL51 TESTI2C.OBJOHS51 TESTI2C編譯,連接,得到TESTI2C.HEX文件,即可由編程器讀入并進(jìn)行寫片,實(shí)驗(yàn)。3.源程序#include <reg51.h>#include <intrins.h> #define uchar unsigned char#define uint unsigned int#define AddWr 0xa0 /*器件地址選擇及寫標(biāo)志*/#define AddRd 0xa1 /*器件地址選擇及讀標(biāo)志*/#define Hidden 0x0e /*顯示器的消隱碼*/

    標(biāo)簽: C51 I2C 單片機(jī) C語言

    上傳時(shí)間: 2013-10-09

    上傳用戶:hjshhyy

  • PIC系列單片機(jī)手冊

    PIC系列單片機(jī)手冊 第1 章 簡介 1-1簡介 ................................................................................................................................................................. 1-2本手冊的宗旨 ................................................................................................................................................... 1-3器件結(jié)構(gòu) .......................................................................................................................................................... 1-4開發(fā)支持 .......................................................................................................................................................... 1-6器件種類 .......................................................................................................................................................... 1-7格式和符號(hào)的約定 ......................................................................................................................................... 1-12相關(guān)文檔 ........................................................................................................................................................ 1-14相關(guān)應(yīng)用筆記 ................................................................................................................................................. 1-17版本歷史 ........................................................................................................................................................ 1-18第2 章 振蕩器 2-1簡介 ................................................................................................................................................................. 2-2振蕩器配置 ...................................................................................................................................................... 2-2晶體振蕩器 / 陶瓷諧振器 ................................................................................................................................. 2-4外部RC 振蕩器 ............................................................................................................................................. 2-124MHz 內(nèi)部 RC 振蕩器 ................................................................................................................................... 2-13休眠模式對片內(nèi)振蕩器的影響 ........................................................................................................................ 2-17器件復(fù)位對片內(nèi)振蕩器的影響 ........................................................................................................................ 2-17設(shè)計(jì)技巧 ........................................................................................................................................................ 2-18相關(guān)應(yīng)用筆記 ................................................................................................................................................. 2-19版本歷史 ........................................................................................................................................................ 2-20第3 章 復(fù)位 3-1簡介 ................................................................................................................................................................. 3-2上電復(fù)位、上電延時(shí)定時(shí)器、 起振定時(shí)器、欠壓復(fù)位和奇偶校驗(yàn)錯(cuò)誤復(fù)位 ...................................................... 3-4寄存器和狀態(tài)位的值 ...................................................................................................................................... 3-10設(shè)計(jì)技巧 ........................................................................................................................................................ 3-16相關(guān)應(yīng)用筆記 ................................................................................................................................................. 3-17版本歷史 ........................................................................................................................................................ 3-18 第4 章 架構(gòu) 4-1簡介 ................................................................................................................................................................. 4-2時(shí)序圖/ 指令周期 ............................................................................................................................................ 4-5指令流/ 流水線 ................................................................................................................................................ 4-6I/O 端口描述 .................................................................................................................................................... 4-7設(shè)計(jì)技巧 ........................................................................................................................................................ 4-12相關(guān)應(yīng)用筆記 ................................................................................................................................................. 4-13版本歷史 ........................................................................................................................................................ 4-14 第5 章 CPU 和ALU 5-1簡介 ................................................................................................................................................................. 5-2指令的一般格式 ............................................................................................................................................... 5-4中央處理單元(CPU) .................................................................................................................................... 5-4指令時(shí)鐘 .......................................................................................................................................................... 5-4算術(shù)邏輯單元(ALU) .................................................................................................................................... 5-5狀態(tài)寄存器 ...................................................................................................................................................... 5-6OPTION_REG 寄存器 ..................................................................................................................................... 5-8電源控制寄存器 ............................................................................................................................................... 5-9設(shè)計(jì)技巧 ........................................................................................................................................................ 5-10相關(guān)應(yīng)用筆記 ................................................................................................................................................. 5-11版本歷史 ........................................................................................................................................................ 5-12第6 章 存儲(chǔ)器構(gòu)成 6-1簡介 ................................................................................................................................................................. 6-2程序存儲(chǔ)器構(gòu)成 ............................................................................................................................................... 6-2數(shù)據(jù)存儲(chǔ)器構(gòu)成 ............................................................................................................................................... 6-8初始化 ........................................................................................................................................................... 6-14設(shè)計(jì)技巧 ........................................................................................................................................................ 6-16相關(guān)應(yīng)用筆記 ................................................................................................................................................. 6-17版本歷史 ........................................................................................................................................................ 6-18第7 章 數(shù)據(jù)EEPROM 7-1簡介 ................................................................................................................................................................. 7-2控制寄存器 ...................................................................................................................................................... 7-3EEADR ............................................................................................................................................................ 7-4EECON1 和EECON2 寄存器 .......................................................................................................................... 7-4從EEPROM 數(shù)據(jù)存儲(chǔ)器中讀數(shù)據(jù) .................................................................................................................... 7-5向EEPROM 數(shù)據(jù)存儲(chǔ)器中寫數(shù)據(jù) .................................................................................................................... 7-5寫校驗(yàn) ............................................................................................................................................................. 7-6誤寫操作保護(hù) ................................................................................................................................................... 7-7代碼保護(hù)配置下的數(shù)據(jù)EEPROM 操作 ............................................................................................................. 7-7初始化 ............................................................................................................................................................. 7-7設(shè)計(jì)技巧 .......................................................................................................................................................... 7-8相關(guān)應(yīng)用筆記 ................................................................................................................................................... 7-9版本歷史 ........................................................................................................................................................ 7-10第8 章 中斷 8-1簡介 ................................................................................................................................................................. 8-2控制寄存器 ...................................................................................................................................................... 8-5中斷響應(yīng)延時(shí) ................................................................................................................................................. 8-10int 和外部中斷 .............................................................................................................................................. 8-10中斷的現(xiàn)場保護(hù) ............................................................................................................................................. 8-11初始化 ........................................................................................................................................................... 8-14設(shè)計(jì)技巧 ........................................................................................................................................................ 8-16相關(guān)應(yīng)用筆記 ................................................................................................................................................. 8-17版本歷史 ........................................................................................................................................................ 8-18第9 章 I/O 端口 9-1簡介 ................................................................................................................................................................. 9-2PORTA 和TRISA 寄存器 ................................................................................................................................ 9-4PORTB 和TRISB 寄存器 ................................................................................................................................ 9-6PORTC 和TRISC 寄存器 ................................................................................................................................ 9-8PORTD 和TRISD 寄存器 ................................................................................................................................ 9-9PORTE 和TRISE 寄存器 ............................................................................................................................... 9-10PORTF 和 TRISF 寄存器 ............................................................................................................................... 9-11PORTG 和TRISG 寄存器 .............................................................................................................................. 9-12GPIO 和TRISGP 寄存器 ............................................................................................................................... 9-13I/O 編程注意事項(xiàng) ........................................................................................................................................... 9-14初始化 ........................................................................................................................................................... 9-16設(shè)計(jì)技巧 ........................................................................................................................................................ 9-17相關(guān)應(yīng)用筆記 ................................................................................................................................................. 9-19版本歷史 ........................................................................................................................................................ 9-20第10 章 并行從動(dòng)端口 10-1簡介 ............................................................................................................................................................... 10-2控制寄存器 .................................................................................................................................................... 10-3操作 ............................................................................................................................................................... 10-4休眠模式下的操作 ......................................................................................................................................... 10-5復(fù)位的影響 .................................................................................................................................................... 10-5PSP 波形 ....................................................................................................................................................... 10-5設(shè)計(jì)技巧 ........................................................................................................................................................ 10-6相關(guān)應(yīng)用筆記 ................................................................................................................................................. 10-7版本歷史 ........................................................................................................................................................ 10-8 第11 章 TIMER0 11-1簡介 ............................................................................................................................................................... 11-2控制寄存器 .................................................................................................................................................... 11-3操作 ............................................................................................................................................................... 11-4TMR0 中斷 .................................................................................................................................................... 11-5Timer0 外部時(shí)鐘的使用 ................................................................................................................................. 11-6TMR0 的預(yù)分頻器 ......................................................................................................................................... 11-7設(shè)計(jì)技巧 ...................................................................................................................................................... 11-10相關(guān)應(yīng)用筆記 ............................................................................................................................................... 11-11版本歷史 ...................................................................................................................................................... 11-12第12 章 TIMER1 12-1簡介 ............................................................................................................................................................... 12-2控制寄存器 .................................................................................................................................................... 12-3Timer1 工作在定時(shí)器模式 ..............................................................................................................................12-4Timer1 工作在同步計(jì)數(shù)器模式 ....................................................................................................................... 12-4Timer1 工作在異步計(jì)數(shù)器模式 ....................................................................................................................... 12-5Timer1 振蕩器 ............................................................................................................................................... 12-7休眠操作 ........................................................................................................................................................ 12-9用CCP 觸發(fā)器的輸出將Timer1 復(fù)位 ............................................................................................................. 12-9Timer1 寄存器(TMR1H:TMR1L)的復(fù)位 .................................................................................................... 12-9Timer1 預(yù)分頻器 ............................................................................................................................................ 12-9初始化 ......................................................................................................................................................... 12-10設(shè)計(jì)技巧 ...................................................................................................................................................... 12-12相關(guān)應(yīng)用筆記 ............................................................................................................................................... 12-13版本歷史 ...................................................................................................................................................... 12-14第13 章 TIMER2 13-1簡介 ............................................................................................................................................................... 13-2控制寄存器 .................................................................................................................................................... 13-3定時(shí)器時(shí)鐘源 ................................................................................................................................................. 13-4定時(shí)器TMR2 和PR2 周期寄存器 .................................................................................................................. 13-4TMR2 匹配輸出 ............................................................................................................................................. 13-4將Timer2 的預(yù)分頻器和后分頻器清零 ........................................................................................................... 13-4休眠操作 ........................................................................................................................................................ 13-4初始化 ........................................................................................................................................................... 13-5設(shè)計(jì)技巧 ........................................................................................................................................................ 13-6相關(guān)應(yīng)用筆記 ................................................................................................................................................. 13-7版本歷史 ........................................................................................................................................................ 13-8第14 章 比較/ 捕捉/ 脈寬調(diào)制(CCP) 14-1簡介 ............................................................................................................................................................... 14-2控制寄存器 .................................................................................................................................................... 14-3捕捉模式 ........................................................................................................................................................ 14-4比較模式 ........................................................................................................................................................ 14-6PWM 模式 ..................................................................................................................................................... 14-8初始化 ......................................................................................................................................................... 14-12設(shè)計(jì)技巧 ...................................................................................................................................................... 14-15相關(guān)應(yīng)用筆記 ............................................................................................................................................... 14-17版本歷史 ...................................................................................................................................................... 14-18第15 章 同步串行口(SSP) 15-1簡介 ............................................................................................................................................................... 15-2控制寄存器 .................................................................................................................................................... 15-3SPITM 模式 .................................................................................................................................................... 15-6SSP 模塊的I2CTM 操作 ............................................................................................................................... 15-16初始化 ......................................................................................................................................................... 15-26設(shè)計(jì)技巧 ...................................................................................................................................................... 15-28相關(guān)應(yīng)用筆記 ............................................................................................................................................... 15-29版本歷史 ...................................................................................................................................................... 15-30第16 章 基本同步串行口(BSSP) 16-1簡介 ............................................................................................................................................................... 16-2控制寄存器 .................................................................................................................................................... 16-3SPITM 模式 .................................................................................................................................................... 16-6SSP 模塊 的I2CTM 操作 ............................................................................................................................... 16-15初始化 ......................................................................................................................................................... 16-23設(shè)計(jì)技巧 ...................................................................................................................................................... 16-24相關(guān)應(yīng)用筆記 ............................................................................................................................................... 16-25版本歷史 ...................................................................................................................................................... 16-26第17 章 主同步串行口(MSSP) 17-1簡介 ............................................................................................................................................................... 17-2控制寄存器 .................................................................................................................................................... 17-4SPITM 模式 .................................................................................................................................................... 17-9SSP 模塊的 I2C™ 操作 ............................................................................................................................... 17-18I2CTM 總線的連接注意事項(xiàng) ........................................................................................................................... 17-56初始化 ......................................................................................................................................................... 17-57設(shè)計(jì)技巧 ...................................................................................................................................................... 17-58相關(guān)應(yīng)用筆記 ............................................................................................................................................... 17-59版本歷史 ...................................................................................................................................................... 17-60第18 章 USART 18-1簡介 ............................................................................................................................................................... 18-2控制寄存器 .................................................................................................................................................... 18-3USART 波特率發(fā)生器(BRG) ..................................................................................................................... 18-5USART 異步工作模式 ................................................................................................................................... 18-8USART 同步主控模式 .................................................................................................................................. 18-15USART 同步從動(dòng)模式 ................................................................................................................................. 18-19初始化 ......................................................................................................................................................... 18-21設(shè)計(jì)技巧 ...................................................................................................................................................... 18-22相關(guān)應(yīng)用筆記 ............................................................................................................................................... 18-23版本歷史 ...................................................................................................................................................... 18-24第19 章 參考電壓模塊 19-1簡介 ............................................................................................................................................................... 19-2控制寄存器 .................................................................................................................................................... 19-3配置參考電壓 ................................................................................................................................................. 19-4參考電壓精度 ................................................................................................................................................. 19-5休眠模式下的操作 ......................................................................................................................................... 19-5復(fù)位的影響 .................................................................................................................................................... 19-5連接注意事項(xiàng) ................................................................................................................................................. 19-6初始化 ........................................................................................................................................................... 19-7設(shè)計(jì)技巧 ........................................................................................................................................................ 19-8相關(guān)應(yīng)用筆記 ................................................................................................................................................. 19-9版本歷史 ...................................................................................................................................................... 19-10第20 章 比較器 20-1簡介 ............................................................................................................................................................... 20-2控制寄存器 .................................................................................................................................................... 20-3設(shè)置比較器模式 ............................................................................................................................................. 20-4比較器工作原理 ............................................................................................................................................. 20-6比較器參考源 ................................................................................................................................................. 20-6比較器的響應(yīng)時(shí)間 ......................................................................................................................................... 20-8比較器輸出 .................................................................................................................................................... 20-8比較器中斷 .................................................................................................................................................... 20-9休眠狀態(tài)下比較器的操作 ............................................................................................................................... 20-9復(fù)位的影響 .................................................................................................................................................... 20-9模擬輸入連接方式注意事項(xiàng) .......................................................................................................................... 20-10初始化 ......................................................................................................................................................... 20-11設(shè)計(jì)技巧 ...................................................................................................................................................... 20-12相關(guān)應(yīng)用筆記 ............................................................................................................................................... 20-13版本歷史 ...................................................................................................................................................... 20-14第21 章 8 位A/D 轉(zhuǎn)換器 21-1簡介 ............................................................................................................................................................... 21-2控制寄存器 .................................................................................................................................................... 21-3操作 ............................................................................................................................................................... 21-5A/D 采集時(shí)間要求 .......................................................................................................................................... 21-6A/D 轉(zhuǎn)換時(shí)鐘的選擇 ...................................................................................................................................... 21-8配置模擬輸入端口 ......................................................................................................................................... 21-9A/D 轉(zhuǎn)換 ...................................................................................................................................................... 21-10休眠期間的A/D 轉(zhuǎn)換 ................................................................................................................................... 21-12A/D 精度/ 誤差 ............................................................................................................................................ 21-13復(fù)位對A/D 轉(zhuǎn)換的影響 ................................................................................................................................ 21-13CCP 觸發(fā)器的使用 ...................................................................................................................................... 21-14連接注意事項(xiàng) ............................................................................................................................................... 21-14傳遞函數(shù) ...................................................................................................................................................... 21-14初始化 ......................................................................................................................................................... 21-15設(shè)計(jì)技巧 ...................................................................................................................................................... 21-16相關(guān)應(yīng)用筆記 ............................................................................................................................................... 21-17版本歷史 ...................................................................................................................................................... 21-18第22 章 基本型8 位A/D 轉(zhuǎn)換器 22-1簡介 ............................................................................................................................................................... 22-2控制寄存器 .................................................................................................................................................... 22-3A/D 采集時(shí)間要求 .......................................................................................................................................... 22-6A/D 轉(zhuǎn)換時(shí)鐘的選擇 ...................................................................................................................................... 22-8配置模擬輸入端口 ....................................................................................................................................... 22-10A/D 轉(zhuǎn)換 ...................................................................................................................................................... 22-11休眠期間的A/D 轉(zhuǎn)換 ................................................................................................................................... 22-14A/D 轉(zhuǎn)換精度/ 誤差 ..................................................................................................................................... 22-15復(fù)位對A/D 轉(zhuǎn)換的影響 ................................................................................................................................ 22-16連接時(shí)的考慮事項(xiàng) ....................................................................................................................................... 22-16傳遞函數(shù) ...................................................................................................................................................... 22-16初始化 ......................................................................................................................................................... 22-17設(shè)計(jì)技巧 ...................................................................................................................................................... 22-18相關(guān)應(yīng)用筆記 ............................................................................................................................................... 22-19版本歷史 ...................................................................................................................................................... 22-20第23 章 10 位A/D 轉(zhuǎn)換器 23-1簡介 ............................................................................................................................................................... 23-2控制寄存器 .................................................................................................................................................... 23-3操作 ............................................................................................................................................................... 23-5A/D 采集時(shí)間要求 .......................................................................................................................................... 23-6A/D 轉(zhuǎn)換時(shí)鐘的選擇 ...................................................................................................................................... 23-8模擬輸入引腳的設(shè)置 ...................................................................................................................................... 23-9A/D 轉(zhuǎn)換的編程舉例 .................................................................................................................................... 23-10休眠期間的A/D 轉(zhuǎn)換 ................................................................................................................................... 23-14復(fù)位對A/D 轉(zhuǎn)換的影響 ................................................................................................................................ 23-14A/D 轉(zhuǎn)換精度與誤差 .................................................................................................................................... 23-15連接時(shí)的考慮事項(xiàng) ....................................................................................................................................... 23-16傳遞函數(shù) ...................................................................................................................................................... 23-16初始化 ......................................................................................................................................................... 23-17設(shè)計(jì)技巧 ...................................................................................................................................................... 23-18相關(guān)應(yīng)用筆記 ............................................................................................................................................... 23-19版本歷史 ...................................................................................................................................................... 23-20第24 章 積分型A/D 轉(zhuǎn)換器 24-1簡介 ............................................................................................................................................................... 24-2控制寄存器 .................................................................................................................................................... 24-3轉(zhuǎn)換過程 ........................................................................................................................................................ 24-6其它模擬模塊 ............................................................................................................................................... 24-12校準(zhǔn)參數(shù) ...................................................................................................................................................... 24-13設(shè)計(jì)技巧 ...................................................................................................................................................... 24-14相關(guān)應(yīng)用筆記 ............................................................................................................................................... 24-15版本歷史 ...................................................................................................................................................... 24-16第25 章 LCD 25-1簡介 ............................................................................................................................................................... 25-2控制寄存器 .................................................................................................................................................... 25-3LCD 定時(shí) ....................................................................................................................................................... 25-6LCD 中斷 ..................................................................................................................................................... 25-12像素控制 ...................................................................................................................................................... 25-13電壓發(fā)生器 .................................................................................................................................................. 25-15休眠模式下的操作 ....................................................................................................................................... 25-16復(fù)位的影響 .................................................................................................................................................. 25-17LCD 模塊的設(shè)置 .......................................................................................................................................... 25-17判別比 ......................................................................................................................................................... 25-18LCD 電壓發(fā)生器 .......................................................................................................................................... 25-20對比度 ......................................................................................................................................................... 25-22LCD 玻璃基板 .............................................................................................................................................. 25-22初始化 ......................................................................................................................................................... 25-23設(shè)計(jì)技巧 ...................................................................................................................................................... 25-24相關(guān)應(yīng)用筆記 ............................................................................................................................................... 25-25版本歷史 ...................................................................................................................................................... 25-26第26 章 看門狗定時(shí)器與休眠模式 26-1簡介 ............................................................................................................................................................... 26-2控制寄存器 .................................................................................................................................................... 26-3看門狗定時(shí)器(WDT)的操作 ....................................................................................................................... 26-4休眠省電模式 ................................................................................................................................................. 26-7初始化 ........................................................................................................................................................... 26-9設(shè)計(jì)技巧 ...................................................................................................................................................... 26-10相關(guān)應(yīng)用筆記 ............................................................................................................................................... 26-11版本歷史 ...................................................................................................................................................... 26-12第27 章 器件配置位 27-1簡介 ............................................................................................................................................................... 27-2配置字位 ........................................................................................................................................................ 27-4編程校驗(yàn)/ 代碼保護(hù) ....................................................................................................................................... 27-8識(shí)別碼ID 的位置 ........................................................................................................................................... 27-9設(shè)計(jì)技巧 ...................................................................................................................................................... 27-10相關(guān)應(yīng)用筆記 ............................................................................................................................................... 27-11版本歷史 ...................................................................................................................................................... 27-12第28 章 在線串行編程 28-1簡介 ............................................................................................................................................................... 28-2進(jìn)入在線串行編程模式 .................................................................................................................................. 28-3應(yīng)用電路 ........................................................................................................................................................ 28-4編程器 ........................................................................................................................................................... 28-6編程環(huán)境 ........................................................................................................................................................ 28-6其它優(yōu)點(diǎn) ........................................................................................................................................................ 28-7PICmicro® OTP 型單片機(jī)的現(xiàn)場編程 ............................................................................................................. 28-8FLASH 型 PICmicro® 單片機(jī)的現(xiàn)場編程 ...................................................................................................... 28-10設(shè)計(jì)技巧 ...................................................................................................................................................... 28-12相關(guān)應(yīng)用筆記 ............................................................................................................................................... 28-13版本歷史 ...................................................................................................................................................... 28-14第29 章 指令集 29-1簡介 ............................................................................................................................................................... 29-2指令格式 ........................................................................................................................................................ 29-4作為源/ 目標(biāo)寄存器的特殊功能寄存器 ........................................................................................................... 29-6Q 周期操作 .................................................................................................................................................... 29-7指令描述 ........................................................................................................................................................ 29-8設(shè)計(jì)技巧 ...................................................................................................................................................... 29-45相關(guān)應(yīng)用筆記 ............................................................................................................................................... 29-47版本歷史 ...................................................................................................................................................... 29-48第30 章 電氣規(guī)范 30-1簡介 ............................................................................................................................................................... 30-2絕對最大值 .................................................................................................................................................... 30-3器件選型表 .................................................................................................................................................... 30-4器件電壓規(guī)范 ................................................................................................................................................. 30-5器件電流特性 ................................................................................................................................................. 30-6輸入閾值電平 ................................................................................................................................................. 30-9I/O 電流特性 ................................................................................................................................................ 30-10輸出驅(qū)動(dòng)電壓 ............................................................................................................................................... 30-11I/O 引腳的容性負(fù)載 ..................................................................................................................................... 30-12數(shù)據(jù)EEPROM / 閃存 .................................................................................................................................. 30-13LCD ............................................................................................................................................................. 30-14比較器和參考電壓 ....................................................................................................................................... 30-15時(shí)序參數(shù)符號(hào) ............................................................................................................................................... 30-16外部時(shí)鐘時(shí)序波形圖和時(shí)序要求示例 ............................................................................................................ 30-17上電和復(fù)位時(shí)序波形圖及要求示例 ............................................................................................................... 30-19定時(shí)器Timer0 和Timer1 時(shí)序波形圖及要求示例 ......................................................................................... 30-20CCP 的時(shí)序圖及要求 ................................................................................................................................... 30-21并行從動(dòng)端口 (PSP) 時(shí)序圖及要求 .............................................................................................................. 30-22SSP 和 MSSP SPITM 模式時(shí)序波形圖及要求示例 ....................................................................................... 30-23SSP I2CTM 模式時(shí)序波形圖及要求示例 ........................................................................................................ 30-27MSSP I2CTM 模式時(shí)序波形圖及要求示例 ..................................................................................................... 30-30USART/SCI 時(shí)序波形圖及要求示例 ............................................................................................................. 30-328 位 A/D 時(shí)序波形圖及要求示例 ................................................................................................................... 30-3410 位A/D 時(shí)序波形圖及要求示例 ................................................................................................................. 30-36積分型A/D 時(shí)序波形圖及要求示例 ............................................................................................................... 30-38LCD 時(shí)序波形圖及要求示例 ......................................................................................................................... 30-40相關(guān)應(yīng)用筆記 ............................................................................................................................................... 30-41版本歷史 ...................................................................................................................................................... 30-42第31 章 器件特性 31-1簡介 ............................................................................................................................................................... 31-2特性和電氣規(guī)范 ............................................................................................................................................. 31-2DC 和AC 特性圖表 ....................................................................................................................................... 31-2版本歷史 ...................................................................................................................................................... 31-22第32 章 開發(fā)工具 32-1簡介 ............................................................................................................................................................... 32-2集成開發(fā)環(huán)境(IDE) ................................................................................................................................... 32-3MPLAB® 軟件語言支持 ................................................................................................................................. 32-6MPLAB® SIM 軟件模擬器 ............................................................................................................................... 32-8MPLAB® 硬件仿真器支持 ............................................................................................................................... 32-9MPLAB® 編程器支持 ................................................................................................................................... 32-10輔助工具 ...................................................................................................................................................... 32-11開發(fā)板 ......................................................................................................................................................... 32-12針對其它Microchip 產(chǎn)品的開發(fā)工具 ............................................................................................................ 32-14相關(guān)應(yīng)用筆記 ............................................................................................................................................... 32-15版本歷史 ...................................................................................................................................................... 32-16第33 章 代碼開發(fā) 33-1版本歷史 ........................................................................................................................................................ 33-2第34 章 附錄 34-1I2CTM 概述...................................................................................................................................................... 34-2LCD 玻璃基板生產(chǎn)商.................................................................................................................................... 34-11改進(jìn)的器件特性............................................................................................................................................ 34-13版本歷史....................................................................................................................................................... 34-19第35 章 術(shù)語表 35-1版本歷史 ...................................................................................................................................................... 35-14目錄

    標(biāo)簽: PIC 單片機(jī)

    上傳時(shí)間: 2013-11-15

    上傳用戶:nanshan

  • 多遠(yuǎn)程二極管溫度傳感器 (Design Considerat

    多遠(yuǎn)程二極管溫度傳感器-Design Considerations for pc thermal management Multiple RDTS (remote diode temperature sensing) provides the most accurate method of sensing an IC’s junction temperature. It overcomes thermal gradient and placement issues encountered when trying to place external sensors. PCB component count decreases when using a device that provides multiple inputs.Better temperature sensing improves product performance and reliability. Disk drive data integrity suffers at elevated temperatures. IBM published an article stating that a 5°C rise in operating temperature causes a 15% increase in the drive’s failure rate. The overall performance of a system can be improved by providing a more accurate temperature measurement of the most critical devices allowing them to run just a few degrees hotter.The LM83 directly senses its own temperature and the temperature of three external PN junctions. One is dedicated to the CPU of choice, the other two go to other parts of your system that need thermal monitoring such as the disk drive or graphics chip. The SMBus-compatible LM83 supports SMBus timeout and logic levels. The LM83 has two interrupt outputs; one for user-programmable limits and WATCHDOG capability (int), the other is a Critical Temperature Alarm output (T_CRIT_A) for system power supply shutdown.

    標(biāo)簽: Considerat Design 遠(yuǎn)程 二極管

    上傳時(shí)間: 2014-12-21

    上傳用戶:ljd123456

主站蜘蛛池模板: 毕节市| 西华县| 老河口市| 页游| 曲阜市| 太谷县| 牡丹江市| 星座| 佛冈县| 永平县| 太白县| 新蔡县| 襄垣县| 剑河县| 邻水| 尖扎县| 娄底市| 佛学| 仁寿县| 府谷县| 贵溪市| 保靖县| 景泰县| 托克托县| 景宁| 彝良县| 宜兴市| 嘉峪关市| 永胜县| 久治县| 竹溪县| 巧家县| 东至县| 连云港市| 石家庄市| 新晃| 济源市| 昌邑市| 甘德县| 格尔木市| 昌图县|