虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

Int

  • 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

  • 24c16读写驱动程序

    24c16读写驱动程序,//=-------------------------------------------------------------------------------/*模块调用:读数据:read(unsigned Int address)写数据:write(unsigned Int address,unsigned char dd)   dd为要写的 数据字节*///------------------------------------------------------------------------------ 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)                 //起始函数{_nop_();    scl=0;     sda=1;    scl=1;    _nop_();    sda=0;    _nop_();    _nop_();    scl=0;     _nop_();    _nop_();    sda=1;} //------------------------------------------------------------------------------#pragma disablevoid p24(void)                 //停止函数{sda=0;    scl=1;    _nop_();    _nop_();    sda=1;} //-----------------------------------------------------------------------------#pragma disableunsigned char rd24(void) /////////////////从24c16读一字节数据{       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写一字节数据{      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;                        ///////////////////////////////////接收器件地址确认信号    wd24(address);                //////////////////////////// 写数据地址    _nop_();_nop_();_nop_();_nop_();    scl=0;s24();                             ///////////////////////////////////开始条件    wd24(0xa1);                 /////////////////////////////写器件地址(读命令)    scl=0;    dd=rd24();              //////////////////////////////////读 一字节    p24();                   ////////////////////////////////////停止条件    return(dd);}//------------------------------------------------------------------------------#pragma disablevoid write(unsigned Int address,unsigned char dd){s24();                        /////////////////开始条件    wd24(0xa0);            ////////////////////////写器件地址;    scl=0;     wd24(address);              /////////////////////写数据地址    scl=0;    wd24(dd);                  //////////////////////////写dd数据    scl=0;    p24();                      /////////////////////////停止条件;  }          

    标签: 24c16 读写 驱动程序

    上传时间: 2013-11-18

    上传用户:墙角有棵树

  • 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

  • 微型打印机的C语言源程序

    微型打印机的C语言源程序:微型打印机的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) //打印机初始化子程序 {  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();}

    标签: 微型打印机 C语言 源程序

    上传时间: 2013-10-18

    上传用户:hasan2015

  • 16 16点阵显示汉字原理及显示程序

    16 16点阵显示汉字原理及显示程序 #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[] = { /*--  调入了一幅图像:这是您新建的图像  --*/ /*--  宽度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 //-----

    标签: 16 点阵显示 汉字 显示程序

    上传时间: 2013-11-18

    上传用户:mnacyf

  • 51单片机驱动步进电机(含电路图和C语言源程序代码)

    51单片机驱动步进电机(含电路图和源程序代码) 源程序: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() */

    标签: 51单片机 驱动 步进电机 C语言

    上传时间: 2013-11-09

    上传用户:钓鳌牧马

  • I2C总线驱动程序

    1 /**————————————————————2 〖说明〗I2C总线驱动程序(用两个普通IO模拟I2C总线)3 包括100Khz(T=10us)的标准模式(慢速模式)选择,4 和400Khz(T=2.5us)的快速模式选择,5 默认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 调用方式:void I2CStart(void) ﹫2001/07/0 431 函数说明:私有函数,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 调用方式:void I2CStop(void) ﹫2001/07/0 443 函数说明:私有函数,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 调用方式:bit I2CAck(void) ﹫2001/07/0 454 函数说明:私有函数,I2C专用,等待从器件接收方的应答55 ---------------------------------------------------------------------------------*/56 bool WaitAck(void)57 {58 uchar errtime=255;//因故障接收方无ACK,超时值为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;

    标签: I2C 总线 驱动程序

    上传时间: 2014-04-11

    上传用户:xg262122

  • C51单片机模拟I2C总线的C语言实现

    EEPROM为ATMEL公司的AT24C01A。单片机为ATMEL公司的AT89C51。2. 软件说明 C语言为Franklin C V3.2。将源程序另存为testi2c.c,用命令C51 testi2c.cL51 TESTI2C.OBJOHS51 TESTI2C编译,连接,得到TESTI2C.HEX文件,即可由编程器读入并进行写片,实验。3.源程序#include <reg51.h>#include <Intrins.h> #define uchar unsigned char#define uInt unsigned Int#define AddWr 0xa0 /*器件地址选择及写标志*/#define AddRd 0xa1 /*器件地址选择及读标志*/#define Hidden 0x0e /*显示器的消隐码*/

    标签: C51 I2C 单片机 C语言

    上传时间: 2013-10-09

    上传用户:hjshhyy

  • PIC系列单片机手册

    PIC系列单片机手册 第1 章 简介 1-1简介 ................................................................................................................................................................. 1-2本手册的宗旨 ................................................................................................................................................... 1-3器件结构 .......................................................................................................................................................... 1-4开发支持 .......................................................................................................................................................... 1-6器件种类 .......................................................................................................................................................... 1-7格式和符号的约定 ......................................................................................................................................... 1-12相关文档 ........................................................................................................................................................ 1-14相关应用笔记 ................................................................................................................................................. 1-17版本历史 ........................................................................................................................................................ 1-18第2 章 振荡器 2-1简介 ................................................................................................................................................................. 2-2振荡器配置 ...................................................................................................................................................... 2-2晶体振荡器 / 陶瓷谐振器 ................................................................................................................................. 2-4外部RC 振荡器 ............................................................................................................................................. 2-124MHz 内部 RC 振荡器 ................................................................................................................................... 2-13休眠模式对片内振荡器的影响 ........................................................................................................................ 2-17器件复位对片内振荡器的影响 ........................................................................................................................ 2-17设计技巧 ........................................................................................................................................................ 2-18相关应用笔记 ................................................................................................................................................. 2-19版本历史 ........................................................................................................................................................ 2-20第3 章 复位 3-1简介 ................................................................................................................................................................. 3-2上电复位、上电延时定时器、 起振定时器、欠压复位和奇偶校验错误复位 ...................................................... 3-4寄存器和状态位的值 ...................................................................................................................................... 3-10设计技巧 ........................................................................................................................................................ 3-16相关应用笔记 ................................................................................................................................................. 3-17版本历史 ........................................................................................................................................................ 3-18 第4 章 架构 4-1简介 ................................................................................................................................................................. 4-2时序图/ 指令周期 ............................................................................................................................................ 4-5指令流/ 流水线 ................................................................................................................................................ 4-6I/O 端口描述 .................................................................................................................................................... 4-7设计技巧 ........................................................................................................................................................ 4-12相关应用笔记 ................................................................................................................................................. 4-13版本历史 ........................................................................................................................................................ 4-14 第5 章 CPU 和ALU 5-1简介 ................................................................................................................................................................. 5-2指令的一般格式 ............................................................................................................................................... 5-4中央处理单元(CPU) .................................................................................................................................... 5-4指令时钟 .......................................................................................................................................................... 5-4算术逻辑单元(ALU) .................................................................................................................................... 5-5状态寄存器 ...................................................................................................................................................... 5-6OPTION_REG 寄存器 ..................................................................................................................................... 5-8电源控制寄存器 ............................................................................................................................................... 5-9设计技巧 ........................................................................................................................................................ 5-10相关应用笔记 ................................................................................................................................................. 5-11版本历史 ........................................................................................................................................................ 5-12第6 章 存储器构成 6-1简介 ................................................................................................................................................................. 6-2程序存储器构成 ............................................................................................................................................... 6-2数据存储器构成 ............................................................................................................................................... 6-8初始化 ........................................................................................................................................................... 6-14设计技巧 ........................................................................................................................................................ 6-16相关应用笔记 ................................................................................................................................................. 6-17版本历史 ........................................................................................................................................................ 6-18第7 章 数据EEPROM 7-1简介 ................................................................................................................................................................. 7-2控制寄存器 ...................................................................................................................................................... 7-3EEADR ............................................................................................................................................................ 7-4EECON1 和EECON2 寄存器 .......................................................................................................................... 7-4从EEPROM 数据存储器中读数据 .................................................................................................................... 7-5向EEPROM 数据存储器中写数据 .................................................................................................................... 7-5写校验 ............................................................................................................................................................. 7-6误写操作保护 ................................................................................................................................................... 7-7代码保护配置下的数据EEPROM 操作 ............................................................................................................. 7-7初始化 ............................................................................................................................................................. 7-7设计技巧 .......................................................................................................................................................... 7-8相关应用笔记 ................................................................................................................................................... 7-9版本历史 ........................................................................................................................................................ 7-10第8 章 中断 8-1简介 ................................................................................................................................................................. 8-2控制寄存器 ...................................................................................................................................................... 8-5中断响应延时 ................................................................................................................................................. 8-10Int 和外部中断 .............................................................................................................................................. 8-10中断的现场保护 ............................................................................................................................................. 8-11初始化 ........................................................................................................................................................... 8-14设计技巧 ........................................................................................................................................................ 8-16相关应用笔记 ................................................................................................................................................. 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 编程注意事项 ........................................................................................................................................... 9-14初始化 ........................................................................................................................................................... 9-16设计技巧 ........................................................................................................................................................ 9-17相关应用笔记 ................................................................................................................................................. 9-19版本历史 ........................................................................................................................................................ 9-20第10 章 并行从动端口 10-1简介 ............................................................................................................................................................... 10-2控制寄存器 .................................................................................................................................................... 10-3操作 ............................................................................................................................................................... 10-4休眠模式下的操作 ......................................................................................................................................... 10-5复位的影响 .................................................................................................................................................... 10-5PSP 波形 ....................................................................................................................................................... 10-5设计技巧 ........................................................................................................................................................ 10-6相关应用笔记 ................................................................................................................................................. 10-7版本历史 ........................................................................................................................................................ 10-8 第11 章 TIMER0 11-1简介 ............................................................................................................................................................... 11-2控制寄存器 .................................................................................................................................................... 11-3操作 ............................................................................................................................................................... 11-4TMR0 中断 .................................................................................................................................................... 11-5Timer0 外部时钟的使用 ................................................................................................................................. 11-6TMR0 的预分频器 ......................................................................................................................................... 11-7设计技巧 ...................................................................................................................................................... 11-10相关应用笔记 ............................................................................................................................................... 11-11版本历史 ...................................................................................................................................................... 11-12第12 章 TIMER1 12-1简介 ............................................................................................................................................................... 12-2控制寄存器 .................................................................................................................................................... 12-3Timer1 工作在定时器模式 ..............................................................................................................................12-4Timer1 工作在同步计数器模式 ....................................................................................................................... 12-4Timer1 工作在异步计数器模式 ....................................................................................................................... 12-5Timer1 振荡器 ............................................................................................................................................... 12-7休眠操作 ........................................................................................................................................................ 12-9用CCP 触发器的输出将Timer1 复位 ............................................................................................................. 12-9Timer1 寄存器(TMR1H:TMR1L)的复位 .................................................................................................... 12-9Timer1 预分频器 ............................................................................................................................................ 12-9初始化 ......................................................................................................................................................... 12-10设计技巧 ...................................................................................................................................................... 12-12相关应用笔记 ............................................................................................................................................... 12-13版本历史 ...................................................................................................................................................... 12-14第13 章 TIMER2 13-1简介 ............................................................................................................................................................... 13-2控制寄存器 .................................................................................................................................................... 13-3定时器时钟源 ................................................................................................................................................. 13-4定时器TMR2 和PR2 周期寄存器 .................................................................................................................. 13-4TMR2 匹配输出 ............................................................................................................................................. 13-4将Timer2 的预分频器和后分频器清零 ........................................................................................................... 13-4休眠操作 ........................................................................................................................................................ 13-4初始化 ........................................................................................................................................................... 13-5设计技巧 ........................................................................................................................................................ 13-6相关应用笔记 ................................................................................................................................................. 13-7版本历史 ........................................................................................................................................................ 13-8第14 章 比较/ 捕捉/ 脉宽调制(CCP) 14-1简介 ............................................................................................................................................................... 14-2控制寄存器 .................................................................................................................................................... 14-3捕捉模式 ........................................................................................................................................................ 14-4比较模式 ........................................................................................................................................................ 14-6PWM 模式 ..................................................................................................................................................... 14-8初始化 ......................................................................................................................................................... 14-12设计技巧 ...................................................................................................................................................... 14-15相关应用笔记 ............................................................................................................................................... 14-17版本历史 ...................................................................................................................................................... 14-18第15 章 同步串行口(SSP) 15-1简介 ............................................................................................................................................................... 15-2控制寄存器 .................................................................................................................................................... 15-3SPITM 模式 .................................................................................................................................................... 15-6SSP 模块的I2CTM 操作 ............................................................................................................................... 15-16初始化 ......................................................................................................................................................... 15-26设计技巧 ...................................................................................................................................................... 15-28相关应用笔记 ............................................................................................................................................... 15-29版本历史 ...................................................................................................................................................... 15-30第16 章 基本同步串行口(BSSP) 16-1简介 ............................................................................................................................................................... 16-2控制寄存器 .................................................................................................................................................... 16-3SPITM 模式 .................................................................................................................................................... 16-6SSP 模块 的I2CTM 操作 ............................................................................................................................... 16-15初始化 ......................................................................................................................................................... 16-23设计技巧 ...................................................................................................................................................... 16-24相关应用笔记 ............................................................................................................................................... 16-25版本历史 ...................................................................................................................................................... 16-26第17 章 主同步串行口(MSSP) 17-1简介 ............................................................................................................................................................... 17-2控制寄存器 .................................................................................................................................................... 17-4SPITM 模式 .................................................................................................................................................... 17-9SSP 模块的 I2C™ 操作 ............................................................................................................................... 17-18I2CTM 总线的连接注意事项 ........................................................................................................................... 17-56初始化 ......................................................................................................................................................... 17-57设计技巧 ...................................................................................................................................................... 17-58相关应用笔记 ............................................................................................................................................... 17-59版本历史 ...................................................................................................................................................... 17-60第18 章 USART 18-1简介 ............................................................................................................................................................... 18-2控制寄存器 .................................................................................................................................................... 18-3USART 波特率发生器(BRG) ..................................................................................................................... 18-5USART 异步工作模式 ................................................................................................................................... 18-8USART 同步主控模式 .................................................................................................................................. 18-15USART 同步从动模式 ................................................................................................................................. 18-19初始化 ......................................................................................................................................................... 18-21设计技巧 ...................................................................................................................................................... 18-22相关应用笔记 ............................................................................................................................................... 18-23版本历史 ...................................................................................................................................................... 18-24第19 章 参考电压模块 19-1简介 ............................................................................................................................................................... 19-2控制寄存器 .................................................................................................................................................... 19-3配置参考电压 ................................................................................................................................................. 19-4参考电压精度 ................................................................................................................................................. 19-5休眠模式下的操作 ......................................................................................................................................... 19-5复位的影响 .................................................................................................................................................... 19-5连接注意事项 ................................................................................................................................................. 19-6初始化 ........................................................................................................................................................... 19-7设计技巧 ........................................................................................................................................................ 19-8相关应用笔记 ................................................................................................................................................. 19-9版本历史 ...................................................................................................................................................... 19-10第20 章 比较器 20-1简介 ............................................................................................................................................................... 20-2控制寄存器 .................................................................................................................................................... 20-3设置比较器模式 ............................................................................................................................................. 20-4比较器工作原理 ............................................................................................................................................. 20-6比较器参考源 ................................................................................................................................................. 20-6比较器的响应时间 ......................................................................................................................................... 20-8比较器输出 .................................................................................................................................................... 20-8比较器中断 .................................................................................................................................................... 20-9休眠状态下比较器的操作 ............................................................................................................................... 20-9复位的影响 .................................................................................................................................................... 20-9模拟输入连接方式注意事项 .......................................................................................................................... 20-10初始化 ......................................................................................................................................................... 20-11设计技巧 ...................................................................................................................................................... 20-12相关应用笔记 ............................................................................................................................................... 20-13版本历史 ...................................................................................................................................................... 20-14第21 章 8 位A/D 转换器 21-1简介 ............................................................................................................................................................... 21-2控制寄存器 .................................................................................................................................................... 21-3操作 ............................................................................................................................................................... 21-5A/D 采集时间要求 .......................................................................................................................................... 21-6A/D 转换时钟的选择 ...................................................................................................................................... 21-8配置模拟输入端口 ......................................................................................................................................... 21-9A/D 转换 ...................................................................................................................................................... 21-10休眠期间的A/D 转换 ................................................................................................................................... 21-12A/D 精度/ 误差 ............................................................................................................................................ 21-13复位对A/D 转换的影响 ................................................................................................................................ 21-13CCP 触发器的使用 ...................................................................................................................................... 21-14连接注意事项 ............................................................................................................................................... 21-14传递函数 ...................................................................................................................................................... 21-14初始化 ......................................................................................................................................................... 21-15设计技巧 ...................................................................................................................................................... 21-16相关应用笔记 ............................................................................................................................................... 21-17版本历史 ...................................................................................................................................................... 21-18第22 章 基本型8 位A/D 转换器 22-1简介 ............................................................................................................................................................... 22-2控制寄存器 .................................................................................................................................................... 22-3A/D 采集时间要求 .......................................................................................................................................... 22-6A/D 转换时钟的选择 ...................................................................................................................................... 22-8配置模拟输入端口 ....................................................................................................................................... 22-10A/D 转换 ...................................................................................................................................................... 22-11休眠期间的A/D 转换 ................................................................................................................................... 22-14A/D 转换精度/ 误差 ..................................................................................................................................... 22-15复位对A/D 转换的影响 ................................................................................................................................ 22-16连接时的考虑事项 ....................................................................................................................................... 22-16传递函数 ...................................................................................................................................................... 22-16初始化 ......................................................................................................................................................... 22-17设计技巧 ...................................................................................................................................................... 22-18相关应用笔记 ............................................................................................................................................... 22-19版本历史 ...................................................................................................................................................... 22-20第23 章 10 位A/D 转换器 23-1简介 ............................................................................................................................................................... 23-2控制寄存器 .................................................................................................................................................... 23-3操作 ............................................................................................................................................................... 23-5A/D 采集时间要求 .......................................................................................................................................... 23-6A/D 转换时钟的选择 ...................................................................................................................................... 23-8模拟输入引脚的设置 ...................................................................................................................................... 23-9A/D 转换的编程举例 .................................................................................................................................... 23-10休眠期间的A/D 转换 ................................................................................................................................... 23-14复位对A/D 转换的影响 ................................................................................................................................ 23-14A/D 转换精度与误差 .................................................................................................................................... 23-15连接时的考虑事项 ....................................................................................................................................... 23-16传递函数 ...................................................................................................................................................... 23-16初始化 ......................................................................................................................................................... 23-17设计技巧 ...................................................................................................................................................... 23-18相关应用笔记 ............................................................................................................................................... 23-19版本历史 ...................................................................................................................................................... 23-20第24 章 积分型A/D 转换器 24-1简介 ............................................................................................................................................................... 24-2控制寄存器 .................................................................................................................................................... 24-3转换过程 ........................................................................................................................................................ 24-6其它模拟模块 ............................................................................................................................................... 24-12校准参数 ...................................................................................................................................................... 24-13设计技巧 ...................................................................................................................................................... 24-14相关应用笔记 ............................................................................................................................................... 24-15版本历史 ...................................................................................................................................................... 24-16第25 章 LCD 25-1简介 ............................................................................................................................................................... 25-2控制寄存器 .................................................................................................................................................... 25-3LCD 定时 ....................................................................................................................................................... 25-6LCD 中断 ..................................................................................................................................................... 25-12像素控制 ...................................................................................................................................................... 25-13电压发生器 .................................................................................................................................................. 25-15休眠模式下的操作 ....................................................................................................................................... 25-16复位的影响 .................................................................................................................................................. 25-17LCD 模块的设置 .......................................................................................................................................... 25-17判别比 ......................................................................................................................................................... 25-18LCD 电压发生器 .......................................................................................................................................... 25-20对比度 ......................................................................................................................................................... 25-22LCD 玻璃基板 .............................................................................................................................................. 25-22初始化 ......................................................................................................................................................... 25-23设计技巧 ...................................................................................................................................................... 25-24相关应用笔记 ............................................................................................................................................... 25-25版本历史 ...................................................................................................................................................... 25-26第26 章 看门狗定时器与休眠模式 26-1简介 ............................................................................................................................................................... 26-2控制寄存器 .................................................................................................................................................... 26-3看门狗定时器(WDT)的操作 ....................................................................................................................... 26-4休眠省电模式 ................................................................................................................................................. 26-7初始化 ........................................................................................................................................................... 26-9设计技巧 ...................................................................................................................................................... 26-10相关应用笔记 ............................................................................................................................................... 26-11版本历史 ...................................................................................................................................................... 26-12第27 章 器件配置位 27-1简介 ............................................................................................................................................................... 27-2配置字位 ........................................................................................................................................................ 27-4编程校验/ 代码保护 ....................................................................................................................................... 27-8识别码ID 的位置 ........................................................................................................................................... 27-9设计技巧 ...................................................................................................................................................... 27-10相关应用笔记 ............................................................................................................................................... 27-11版本历史 ...................................................................................................................................................... 27-12第28 章 在线串行编程 28-1简介 ............................................................................................................................................................... 28-2进入在线串行编程模式 .................................................................................................................................. 28-3应用电路 ........................................................................................................................................................ 28-4编程器 ........................................................................................................................................................... 28-6编程环境 ........................................................................................................................................................ 28-6其它优点 ........................................................................................................................................................ 28-7PICmicro® OTP 型单片机的现场编程 ............................................................................................................. 28-8FLASH 型 PICmicro® 单片机的现场编程 ...................................................................................................... 28-10设计技巧 ...................................................................................................................................................... 28-12相关应用笔记 ............................................................................................................................................... 28-13版本历史 ...................................................................................................................................................... 28-14第29 章 指令集 29-1简介 ............................................................................................................................................................... 29-2指令格式 ........................................................................................................................................................ 29-4作为源/ 目标寄存器的特殊功能寄存器 ........................................................................................................... 29-6Q 周期操作 .................................................................................................................................................... 29-7指令描述 ........................................................................................................................................................ 29-8设计技巧 ...................................................................................................................................................... 29-45相关应用笔记 ............................................................................................................................................... 29-47版本历史 ...................................................................................................................................................... 29-48第30 章 电气规范 30-1简介 ............................................................................................................................................................... 30-2绝对最大值 .................................................................................................................................................... 30-3器件选型表 .................................................................................................................................................... 30-4器件电压规范 ................................................................................................................................................. 30-5器件电流特性 ................................................................................................................................................. 30-6输入阈值电平 ................................................................................................................................................. 30-9I/O 电流特性 ................................................................................................................................................ 30-10输出驱动电压 ............................................................................................................................................... 30-11I/O 引脚的容性负载 ..................................................................................................................................... 30-12数据EEPROM / 闪存 .................................................................................................................................. 30-13LCD ............................................................................................................................................................. 30-14比较器和参考电压 ....................................................................................................................................... 30-15时序参数符号 ............................................................................................................................................... 30-16外部时钟时序波形图和时序要求示例 ............................................................................................................ 30-17上电和复位时序波形图及要求示例 ............................................................................................................... 30-19定时器Timer0 和Timer1 时序波形图及要求示例 ......................................................................................... 30-20CCP 的时序图及要求 ................................................................................................................................... 30-21并行从动端口 (PSP) 时序图及要求 .............................................................................................................. 30-22SSP 和 MSSP SPITM 模式时序波形图及要求示例 ....................................................................................... 30-23SSP I2CTM 模式时序波形图及要求示例 ........................................................................................................ 30-27MSSP I2CTM 模式时序波形图及要求示例 ..................................................................................................... 30-30USART/SCI 时序波形图及要求示例 ............................................................................................................. 30-328 位 A/D 时序波形图及要求示例 ................................................................................................................... 30-3410 位A/D 时序波形图及要求示例 ................................................................................................................. 30-36积分型A/D 时序波形图及要求示例 ............................................................................................................... 30-38LCD 时序波形图及要求示例 ......................................................................................................................... 30-40相关应用笔记 ............................................................................................................................................... 30-41版本历史 ...................................................................................................................................................... 30-42第31 章 器件特性 31-1简介 ............................................................................................................................................................... 31-2特性和电气规范 ............................................................................................................................................. 31-2DC 和AC 特性图表 ....................................................................................................................................... 31-2版本历史 ...................................................................................................................................................... 31-22第32 章 开发工具 32-1简介 ............................................................................................................................................................... 32-2集成开发环境(IDE) ................................................................................................................................... 32-3MPLAB® 软件语言支持 ................................................................................................................................. 32-6MPLAB® SIM 软件模拟器 ............................................................................................................................... 32-8MPLAB® 硬件仿真器支持 ............................................................................................................................... 32-9MPLAB® 编程器支持 ................................................................................................................................... 32-10辅助工具 ...................................................................................................................................................... 32-11开发板 ......................................................................................................................................................... 32-12针对其它Microchip 产品的开发工具 ............................................................................................................ 32-14相关应用笔记 ............................................................................................................................................... 32-15版本历史 ...................................................................................................................................................... 32-16第33 章 代码开发 33-1版本历史 ........................................................................................................................................................ 33-2第34 章 附录 34-1I2CTM 概述...................................................................................................................................................... 34-2LCD 玻璃基板生产商.................................................................................................................................... 34-11改进的器件特性............................................................................................................................................ 34-13版本历史....................................................................................................................................................... 34-19第35 章 术语表 35-1版本历史 ...................................................................................................................................................... 35-14目录

    标签: PIC 单片机

    上传时间: 2013-11-15

    上传用户:nanshan

  • 多远程二极管温度传感器 (Design Considerat

    多远程二极管温度传感器-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.

    标签: Considerat Design 远程 二极管

    上传时间: 2014-12-21

    上传用户:ljd123456