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

Robertgurse
Wed Apr 24 2024, 02:43 pm
Richardedils
Wed Apr 24 2024, 04:07 am
ChrisLub
Tue Apr 23 2024, 05:21 pm
Davidbab
Tue Apr 23 2024, 10:41 am
Richardrit
Tue Apr 23 2024, 09:54 am
HenryLaf
Mon Apr 22 2024, 03:50 pm
bleradrar
Mon Apr 22 2024, 06:38 am
ppu-pro_ka
Sun Apr 21 2024, 07:39 pm