I am referencing this project: http://www.8051projects.net/wiki/I2C_Implementation_on_PIC
I am using PIC16F1847 and XC8 as opposed to PIC16F877 and HiTech C so I've had to make a few changes to the code. After making changes, my compiler gave me an error for the I2CWait function for the while statement. It says "unexpected token amp".
Here is the line in question:
while ((SSPCON2 & 0x1F ) || ( SSPSTAT & 0x04 ) );
I changed the register names to be consistent with my PIC's registers (below) but it didn't solve the problem.
while ((SSP1CON2 & 0x1F ) || ( SSP1STAT & 0x04 ) );
What changes do I need to make to this function so that this error does not occur?
[ Edited Wed Jun 29 2016, 03:37 PM ]