2 Attachment(s)
I2CWRITE Issue at Compiling Time
Hi all,
I'm using a PIC16F1939 to control a RTC chip with I2C. I'm using PBP2.60. The 16F1939 has 16384 words of programming memory. So whenever I compile the big program that I'm playing with I get the normal message,
Attachment 7390
Everything good so far. So, whatever code I add to my program I get the above "Crossing page boundary...." messages. Now, if I add these lines of code,
Code:
SYMBOL SCL = PORTC.3 'EEPROM CLOCK PIN
SYMBOL SDA = PORTC.4 'EEPROM DATA PIN
ADDRESS VAR BYTE
CONTROL VAR BYTE: CONTROL = %11011111
WRITE_VAR = %01000000
'I2CWRITE SDA, SCL, %11011111, $07, [WRITE_VAR]
ADDRESS = $07
I2CWRITE SDA, SCL, CONTROL, ADDRESS, [WRITE_VAR]
PAUSE 10
Then, I always get the following messages,
Attachment 7391
The program seems to be working fine. But, I have no idea why I get this "1183 : Crossing page boundary..." message only when I use the I2CWRITE. I'm pulling my hair out trying to figure this out :eek:. Any help will be greatly appreciated.
Thank you,
Re: I2CWRITE Issue at Compiling Time
Re: I2CWRITE Issue at Compiling Time
Quote:
Originally Posted by
richard
Thanks Richard, but why this "1183 : Crossing page boundary..." message appears only when I use the I2CWRITE command? That is what I don't understand. Is this a normal compiling message?
Re: I2CWRITE Issue at Compiling Time
Yes. It appears only when your code is larger than 1K, 2K etc...
Re: I2CWRITE Issue at Compiling Time
Quote:
Originally Posted by
pedja089
Yes. It appears only when your code is larger than 1K, 2K etc...
I know it's a normal thing. The question is that whatever code I add to my program I get the usual crossing page boundary messages. I can get the programming memory nearly full and I get the messages in the first picture posted above. Only and only when using I2CWRITE is that I get the "1183 : Crossing page boundary...".
Re: I2CWRITE Issue at Compiling Time
I do believe that the '1183' refers to a line number in the assembled code. The number changes depending upon which libraries are called and where the page crossing occurs in the listing.
Re: I2CWRITE Issue at Compiling Time
Hi, that makes sense. Because it only happens when using the I2CWRITE command.