PIC单片机之I2C(从模式)
时间:05-30
来源:互联网
点击:
nter; rx_status=false; Temp=SSP1STAT; Temp = 0x2D; if(Temp==0x09)//Write operation,last byte was an address,buffer is full { SSP1IF = 0; i2c_address = SSP1BUF; timercounter=while_delay; while(PIR1bits.SSP1IF == 0) { timercounter--; if(timercounter==0) { return ; } }//waiting for send ~ACK SSP1IF = 0; word_address = SSP1BUF; return ; } if(Temp==0x29)//Write operation,last byte was data,buffer is full { SSP1IF=0; Register[word_address]=SSP1BUF; word_address++; if(word_address>=RX_BUF_LEN) { word_address=0; } } }
- 基于PIC单片机的智能型漏电断路器设计(11-25)
- 基于PIC单片机的无线实时监控防盗系统的设计与实现(11-18)
- PIC单片机键盘矩阵扫描C语言程序(12-02)
- PIC单片机控制第一个发光管闪动程序(12-02)
- PIC单片机驱动LCD12864液晶显示闪动字体程序(12-02)
- PIC单片机控制8位流水灯C语言程序(12-02)