I2C issue with pic18f8722

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
cmillet
Posts: 4
Joined: 17 Apr 2009 17:55

I2C issue with pic18f8722

#1 Post by cmillet » 17 Apr 2009 18:02

I use a bigpic4 mcu with pic18f8722 with a bigpic5 board. I compile the Real Time Clock example which uses I2C and LCD provided with the compiler.

This example doesn't work with pic18f8722, it seems there is an I2C communication issue. It seems to wait something (may be ACK).

The example works fine with the pic18f8520 module. Any idea ?

Thanks
Christophe

cmillet
Posts: 4
Joined: 17 Apr 2009 17:55

#2 Post by cmillet » 17 Apr 2009 21:23

I made further debugging :
- Soft I2C works fine
- The example with hardware I2C works if I replace I2C1_Init with I2C2_Init although I use I2C1 read and write.

Bug or regular behavior ?

cmillet
Posts: 4
Joined: 17 Apr 2009 17:55

#3 Post by cmillet » 18 Apr 2009 21:46

I check the asm generated file.

I wonder if SSP1ADD and SSP2ADD have been inverted ?

;RTC_Read.c,118 :: I2C1_Init(100000);
MOVLW 25
MOVWF SSP2ADD+0
CALL _I2C2_Init+0, 0
;RTC_Read.c,119 :: I2C2_Init(100000);
MOVLW 25
MOVWF SSP1ADD+0
CALL _I2C1_Init+0, 0

cmillet
Posts: 4
Joined: 17 Apr 2009 17:55

#4 Post by cmillet » 22 Apr 2009 14:43

I receive an answer from the support.

It's a bug as suspected.

It should be fixed in a next release of the compiler.

Post Reply

Return to “mikroC PRO for PIC General”