Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned char readI2C(void)
- {
- unsigned char temp;
- RCEN = 1;
- while(!BF);
- temp = SSPBUF;
- I2CWait();
- return temp;
- }
- void I2CWait()
- {
- while ((SSPCON2 & 0x1F ) || ( SSPSTAT & 0x04 ) );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement