| |
最新电子论文 |
|
推荐电子论文 |
|
|
|
| ■ 所在位置:首页>>电子技术>>单片机技术>>正文 |
| |
PIC单片机的I2C读写源程序
|
|
TITLE \" TWO WIRE/I2C BUS INTERFACE WITH PIC16C5x \" ; LIST P=16C54
;***************************************************************************** ;** Two wire/I2C Bus READ/WRITE Sample Routines of Microchip's ;** 24Cxx / 85Cxx serial CMOS EEPROM interfacing to a ;** PIC16C54 8-bit CMOS single chip microcomputer ;** Revsied Version 2.0 (4/2/92). ;** ;** Part use = PIC16C54-XT/JW ;** Note: 1) All timings are based on a reference crystal frequency of 2MHz ;** which is equivalent to an instruction cycle time of 2 usec. ;** 2) Address and literal values are read in octal unless otherwise ;** specified. ; ; ; Program: I2CBUS.ASM ; Revision Date: ; 12-12-95 Compatibility with MPASMWIN 1.30 ; ;********************************************************************** ; ;***************************************************************************** ; ;----------------------------------------------------------------------------- ; Files Assignment ;----------------------------------------------------------------------------- ; PC EQU 2 ; Program counter STAT EQU 3 ; PIC status byte FSR EQU 4 ; File Select Register RA EQU 5 ; Port A use to select device address RB EQU 6 ; RB7 = SDA, RB6 = SCL ; STATUS EQU 08 ; Status register FLAG EQU 09 ; Common flag bits register EEPROM EQU 0A ; Bit buffer ERCODE EQU 0B ; Error code (to indicate bus status) ADDR EQU 10 ; Address register本新闻共 9页,当前在第 1页 [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] |
|
| |
|
|
相关文章 |
|
|
|
|