The PCA9671 provides general purpose remote I/O expansion for most microcontrollerfamilies via the two-line bidirectional bus (I2C-bus) and is a part of the Fast-mode Plus(Fm+) family.The PCA9671 is a drop in upgrade for the PCF8575 providing higher I2C-bus speeds(1 MHz versus 400 kHz) so that the output can support PWM dimming of LEDs, higherI2C-bus drive (30 mA versus 3 mA) so that many more devices can be on the bus withoutthe need for bus buffers, higher total package sink capacity (400 mA versus 100 mA) thatsupports having all 25 mA LEDs on at the same time and more device addresses (64versus 8) to allow many more devices on the bus without address conflicts.
上傳時間: 2013-10-12
上傳用戶:laomv123
The PCA9672 provides general purpose remote I/O expansion for most microcontrollerfamilies via the two-line bidirectional bus (I2C-bus) and is a part of the Fast-mode Plusfamily.The PCA9672 is a drop-in upgrade for the PCF8574 providing higher Fast-mode Plus(Fm+) I2C-bus speeds (1 MHz versus 400 kHz) so that the output can support PWMdimming of LEDs, higher I2C-bus drive (30 mA versus 3 mA) so that many more devicescan be on the bus without the need for bus buffers, higher total package sink capacity(200 mA versus 100 mA) that supports having all LEDs on at the same time and moredevice addresses (16 versus 8) are available to allow many more devices on the buswithout address conflicts.
上傳時間: 2013-10-23
上傳用戶:jasonheung
The PCA9673 provides general purpose remote I/O expansion for most microcontrollerfamilies via the two-line bidirectional bus (I2C-bus) and is a part of the Fast-mode Plusfamily.The PCA9673 is a drop in upgrade for the PCF8575 providing higher Fast-mode Plus(Fm+) I2C-bus speeds (1 MHz versus 400 kHz) so that the output can support PWMdimming of LEDs, higher I2C-bus drive (30 mA versus 3 mA) so that many more devicescan be on the bus without the need for bus buffers, higher total package sink capacity(400 mA versus 100 mA) that supports having all 25 mA LEDs on at the same time andmore device addresses (16 versus 8) are available to allow many more devices on the buswithout address conflicts.
上傳時間: 2013-10-29
上傳用戶:wkchong
The PCA9674/74A is a drop-in upgrade for the PCF8574/74A providing higher Fast-modePlus I2C-bus speeds (1 MHz versus 400 kHz) so that the output can support PWMdimming of LEDs, higher I2C-bus drive (30 mA versus 3 mA) so that many more devicescan be on the bus without the need for bus buffers, higher total package sink capacity(200 mA versus 100 mA) that supports having all LEDs on at the same time and moredevice addresses (64 versus 8) are available to allow many more devices on the buswithout address conflicts.
上傳時間: 2013-10-22
上傳用戶:wwwwwen5
The CAT9555 is a CMOS device that provides 16-bitparallel input/output port expansion for I²C and SMBuscompatible applications. These I/O expanders providea simple solution in applications where additional I/Osare needed: sensors, power switches, LEDs,pushbuttons, and fans.
上傳時間: 2014-01-09
上傳用戶:1101055045
單片機C語言應用程序設計針對目前最通用的單片機8051和最流行的程序設計語言——C語言,以KEII。公司8051單片機開發套件講解單片機的C語言應用程序設計。該套件的編譯器有支持經典8051及8051派生產品的版本,統稱為Cx51。Windows集成開發環境μVision2把μVisionl用的模擬調試器dScope與集成環境無縫結合起來,使用更方便,支持的單片機品種更多。 本書的特點是取材于原文資料,總結實際教學和應用經驗,實例較多,實用性強。本書中C語言是針對8051特有結構描述的,這樣,即使無編程基礎的人,也可通過本書學習單片機的c編程。單片機C語言應用程序設計目錄第1章 單片機基礎知識 1.1 8051單片機的特點 1.2 8051的內部知識 1.3 8051的系統擴展 習題一第2章 C與8051 2.1 8051的編程語言 2.2 Cx51編譯器 2.3 KEIL 8051開發工具 2.4 KEIL Cx51編程實例 2.5 Cx51程序結構 習題二第3章 Cx51 數據與運算 3.1 數據與數據類型 3.2 常量與變量 3.3 Cx51數據存儲類型與8051存儲器結構 3.4 8051特殊功能寄存器(SFR)及其Cx51定義 3.5 8051并行接口及其Cx51定義 3.6 位變量(bit)及其Cx51定義 3.7 Cx51運算符、表達式及其規則 習題三第4章 Cx51 流程控制語句 4.1 C語言程序的基本結構及其流程圖 4.2 選擇語句 4.3 循環語句 習題四第5章 Cx51 構造數據類型 5.1 數組 5.2 指針 5.3 結構 5.4 共用體 5.5 枚舉 習題五第6章 Cx51 函數第7章 模塊化程序設計第8章 8051內部資源的C編輯第9章 8051擴展資源的C編輯第10章 8051輸出控制的C編程第11章 8051數據采集的C編程第12章 8051機間通信的C編程第13章 8051人機交互的C編程附錄A μVision2集成開發環境使用附錄B KEIL Cx51 上機制南
上傳時間: 2013-10-21
上傳用戶:行者Xin
keil 使用筆記:在Memory窗口上輸入address_type:address才能看到正確地址的變量debug~perfermance analyzer加入要察看的模塊名稱,然后view~perfermance analyzer window 可以察看各個模塊運行時間①Display address_type:address B:bit address C:Code Memory Bx:Code Bank D D:80H 命令可以查看特殊寄存器 data D I:0 命令可以查看內部RAM數據iData; D X:0 命令可以查看外部RAM數據xData; ②R1 //顯示R1 register ~R1 //顯示變量R1 R1 = R7 //對寄存器Rx操作R1 = --R7 R1 = 0x20 ③main //顯示main()的開始地址d main //顯示main()的代碼④向RAM.ROM中寫數據Enter data_type address_type:address expr,expr.... data_type:int char double float long E char data:0x20 1,2,3,4 //向data區0x20開始的地址寫1,2,3,4 變量放在RAM的30H,要把定義放在main前面!另外特別注意,內部RAM通常供C程序存放中間變量等,所以一定要看看編譯后的程序中是否存在存儲單元沖突的情況,比如如果程序中 使用了別的寄存器組的話,08-1FH單元就不能用了unsigned long data i _at_ 0x30
上傳時間: 2013-11-05
上傳用戶:dongqiangqiang
這一顆,我們學習如何讓跑馬燈自動按照我們預定的順序進行。這種控制在工控場合經常用到。這個程序里,我們預先定義了一個變化的順序speedcode,每跑一圈燈就根據預定設置的表格數據來決定下一圈的跑馬速度。這樣我們就實現了按照預定的順序自動變化運行。請看代碼:-----------------------------------#define uchar unsigned char //定義一下方便使用#define uint unsigned int#define ulong unsigned long#include <reg52.h> //包括一個52 標準內核的頭文件sbit P10 = P1^0; //頭文件中沒有定義的IO 就要自己來定義了sbit P11 = P1^1;sbit P12 = P1^2;sbit P13 = P1^3;bit ldelay=0; //長定時溢出標記,預置是0uchar speed=10; //設置一個變量保存跑馬燈的移動速度uchar code speedcode[10]={3,1,5,12,3,20,2,10,1,4}; //10 個預定義的速度char code dx516[3] _at_ 0x003b;//這是為了仿真設置的//可編程自動控制跑馬燈void main(void) // 主程序{uchar code ledp[4]={0xfe,0xfd,0xfb,0xf7};//預定的寫入P1 的值uchar ledi; //用來指示顯示順序uchar i;RCAP2H =0x10; //賦T2 的預置值0x1000,溢出30 次就是1 秒鐘RCAP2L =0x00;TR2=1; //啟動定時器ET2=1; //打開定時器2 中斷EA=1; //打開總中斷
上傳時間: 2013-11-20
上傳用戶:ming529
單片機指令系統 3.1 MCS-51指令簡介 3.2 指令系統 3.1 MCS-51指令簡介 二、MCS-51系列單片機指令系統分類 按尋址方式分為以下七種:按功能分為以下四種: 1、立即立即尋址 1、數據傳送指令位操 2、直接尋址 2、算術運算指令 3、寄存器尋址 3、邏輯運算指令 4、寄存器間接尋址指令 4、控制轉移類指令 5、相對尋址 5、位操作指令 6、變址尋址 7、位尋址 三、尋址方式 3、寄存器間接尋址 MOV A, @R1 操作數是通過寄存器間接得到的。 4、立即尋址 MOV A, #40H 操作數在指令中直接給出。 5、基址寄存器加變址寄存器尋址 以DPTR或PC為基址寄存器,以A為變址寄存器, 以兩者相加形成的16位地址為操作數的地址。 MOVC A, @A+DPTR MOVC A, @A+PC 四、指令中常用符號說明 Rn——當前寄存器區的8個工作寄存器R0~R7(n=0~7); Ri——當前寄存器區可作地址寄存器的2個工作寄存器R0和R1(i=0,1); direct——8位內部數據存儲器單元的地址及特殊功能寄存器的地址; #data——表示8位常數(立即數); #datal6——表示16位常數; add 16——表示16位地址; addrll——表示11位地址; rel——8位帶符號的地址偏移量; bit——表示位地址; @——間接尋址寄存器或基址寄存器的前綴; ( )——表示括號中單元的內容 (( ))——表示間接尋址的內容; 五、MCS-51指令簡介 1. 以累加器A為目的操作數的指令 2. 以Rn為目的操作數的指令 3. 以直接地址為目的操作數的指令 4. 以寄存器間接地址為目的操作數指令 應用舉例1 8段數碼管顯示 應用舉例2 3.2 指令系統 2、堆棧操作指令 3. 累加器A與外部數據傳輸指令 4. 查表指令 MOVC A, @A+PC 例子: 5. 字節交換指令 6. 半字節交換指令 二、算術操作類指令 PSW寄存器 2. 帶進位加法指令 3. 加1指令 4. 十進制調整指令 5. 帶借位減法指令(Subtraction) 6. 減1指令(Decrease) 7. 乘法指令(Multiplication) 8. 除法指令(Division) 三、邏輯運算指令 1. 簡單邏輯操作指令 2. 循環指令 帶進位左循環指令(Rotate Accumulator Left through Carry flag) 右循環指令(Rotate Accumulator Right) 帶進位右循環指令(Rotate A Right with C) 3. 邏輯與指令 4. 邏輯或指令 5. 邏輯異或指令 四、控制轉移類指令 1. 跳轉指令 相對轉移指令 SJMP rel PC←(PC)+2 PC←(PC)+rel 程序中標號與地址之間的關系 2. 條件轉移指令 3. 比較不相等轉移指令 4. 減 1 不為 0 轉移指令 5. 調用子程序指令 7. 中斷返回指令 五、位操作指令 1. 數據位傳送指令 2. 位變量邏輯指令 3. 條件轉移類指令
上傳時間: 2013-10-27
上傳用戶:xuanjie
The C500 microcontroller family usually provides only one on-chip synchronous serialchannel (SSC). If a second SSC is required, an emulation of the missing interface mayhelp to avoid an external hardware solution with additional electronic components.The solution presented in this paper and in the attached source files emulates the mostimportant SSC functions by using optimized SW routines with a performance up to 25KBaud in Slave Mode with half duplex transmission and an overhead less than 60% atSAB C513 with 12 MHz. Due to the implementation in C this performance is not the limitof the chip. A pure implementation in assembler will result in a strong reduction of theCPU load and therefore increase the maximum speed of the interface. In addition,microcontrollers like the SAB C505 will speed up the interface by a factor of two becauseof an optimized architecture compared with the SAB C513.Moreover, this solution lays stress on using as few on-chip hardware resources aspossible. A more excessive consumption of those resources will result in a highermaximum speed of the emulated interface.Due to the restricted performance of an 8 bit microcontroller a pin compatible solution isprovided only; the internal register based programming interface is replaced by a set ofsubroutine calls.The attached source files also contain a test shell, which demonstrates how to exchangeinformation between an on-chip HW-SSC and the emulated SW-SSC via 5 external wiresin different operation modes. It is based on the SAB C513 (Siemens 8 bit microcontroller).A table with load measurements is presented to give an indication for the fraction of CPUperformance required by software for emulating the SSC.
標簽: synchronous Emulating serial
上傳時間: 2014-01-31
上傳用戶:z1191176801