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

Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am
Anthonyvab
Wed Apr 17 2024, 08:48 am
RobertCix
Wed Apr 17 2024, 06:46 am