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

HazelKt
Thu May 30 2024, 02:03 pm
Bertakiacatt
Thu May 30 2024, 09:33 am
Edwardcleri
Wed May 29 2024, 03:33 pm
Anthonygar
Wed May 29 2024, 03:19 pm
Brandonvab
Wed May 29 2024, 05:35 am
SeymourAdard
Tue May 28 2024, 01:54 pm
DavidAnike
Tue May 28 2024, 08:55 am
BlaineTew
Tue May 28 2024, 06:41 am