Page 1 of 1

I2c Hardware Library

Posted: 05 Jun 2008 21:28
by norbie
Hi, it seems that this is being read so forgive me if I might post it in the wrong category.
I wish I could use the I2c hard library with the MikroC for DSPIC compiler.

I have an ST 24C16 EEPROM connected to the I2c bus and am trying to get some results using the I2c library without success. The hardware is connected correctly, since it will work using MikroBasic for DSPIC's. The MCU is a 24HJ256GP206 and I am using SDA1 / SCL1.
Unless the Basic compiler does something that I don't know of, the MikroC compiler has a problem with the I2c Bus Timing. Looking at it with a fast storage scope it seems that there are other artifacts showing up on the bus and possibly prevent the EEPROM from functioning correctly. This does not occur when similar code is compiled with the Basic Compiler.
Also, the I2c will only work on up to 16MHz base clock and it is impossible to run with PLL enabled. This goes for all compiler, yes I know it's the BRG however doesn't it make sense if the MCU works fine at 16MHz and PLL x 4 works alright, but not on the UART and I2c bus. Strange to me because 64 MHz PLL is a multiple of the 16 MHz base?????
Sorry, for putting it here!!!!

Posted: 11 Jun 2008 07:48
by milan
Hi,

please send your report and project folders ( both for mikroC for dsPIC30/33 and PIC24 and for mikroBasic for dsPIC30/33 and PIC24 )
to our Support Desk http://www.mikroe.com/en/support/
Our Support Team will reproduce/examine the problem.

BTW, this topic belongs to mikroC for dsPIC30/33 and PIC24 General :wink:
Wishlist is for requesting new Libraries, IDE solutions, Tools ...