Discussion in "Project Doubts" started by    dyoussef    Jun 30, 2016.
Thu Jun 30 2016, 01:04 am
#1
Hello,

I am referencing this project: http://www.8051projects.net/wiki/I2C_Implementation_on_PIC

I am using PIC16F1847 and XC8 so I've had to make a few changes to the code. While 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 but it didn't solve the problem.

What changes do I need to make to this function so that this error does not occur?


[ Edited Thu Jun 30 2016, 01:07 am ]
Thu Jun 30 2016, 11:14 am
#2
I think the display/ editor software added the amp

It should say...
while ((SSPCON2 & 0x1F ) || ( SSPSTAT & 0x04 ) );


[ Edited Thu Jun 30 2016, 11:17 am ]

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am
ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm