PIC单片机模拟IIC读写的程序设计.docx
《PIC单片机模拟IIC读写的程序设计.docx》由会员分享,可在线阅读,更多相关《PIC单片机模拟IIC读写的程序设计.docx(3页珍藏版)》请在冰豆网上搜索。
PIC单片机模拟IIC读写的程序设计
PIC单片机模拟IIC读写的程序设计
;I2C总线程序
;thisiseepromread">;thespecialstoreramunit
wequ0
f0equ0
rtCCequ1
pcequ2
f2equ2
f3equ3
f4equ4
raequ5
rbequ6
rcequ7
pclathequ0ah
iNTConequ0bh
pir1equ0ch
tmr1lequ0eh
tmr1hequ0fh
t1conequ10h
tmr2equ11h
t2conequ12h
sspbufequ13h
sspconequ14h
ccpr1lequ15h
ccpr1hequ16h
ccpconequ17h
adcon0equ1fh
;
;inthebank1
trISAequ85h
trisbequ86h
triscequ87h
pconequ8eh
pie1equ8ch
pr2equ92h
sspaddequ93h
sspstatequ94h
adcon1equ9fh
;
;--------------------------------------------------------
;thegenaralstoreramunit
;
temp6equ76h
temp7equ77h
;
eepCTRequ6dh;eepromcontrolwordsbuffer
eepaddrequ6eh;eepromaddressbuffer
eepdataequ6fh;eepromdatabuffer
;
;--------------------------------------------------------
;thebitsoframunit
sclequ3;rc
sdaequ4;rc
;
pdequ3;status
toequ4;status
;
rbifequ0;intcon
intifequ1;intcon
rTIfequ2;intcon
rbieequ3;intcon
inTIeequ4;intcon