Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with I2C (X.2 8 bits)
10-02-2012, 02:27 PM,
#1
Problems with I2C (X.2 8 bits)
I found some problems with i2c in 8 bits boards. I'm trying to recompile my old code (9.05 version) in X.2. I just can't.
I can't make i2c work. None of the functions in the wiki work (compiler says: ' 0: Undefined identifier 'I2C' ') and none of the old functions seem to work (at least as before): init_I2C, I2C_read...
The only code that seems to work is the "pure" SDCC (using #include i2c.h), but those don't have the "high-level" functions we love of Pinguino...

Is it a bug or is it something I'm doing wrong?

Reply
10-02-2012, 04:42 PM,
#2
RE: Problems with I2C (X.2 8 bits)
Give us an example of your .pde file ...


(10-02-2012, 02:27 PM)electronlibre Wrote: I found some problems with i2c in 8 bits boards. I'm trying to recompile my old code (9.05 version) in X.2. I just can't.
I can't make i2c work. None of the functions in the wiki work (compiler says: ' 0: Undefined identifier 'I2C' ') and none of the old functions seem to work (at least as before): init_I2C, I2C_read...
The only code that seems to work is the "pure" SDCC (using #include i2c.h), but those don't have the "high-level" functions we love of Pinguino...

Is it a bug or is it something I'm doing wrong?

It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
10-02-2012, 06:28 PM,
#3
RE: Problems with I2C (X.2 8 bits)
I attach the original .pde I was trying to "update". It doesn't recognize libI2C.c, I guess because I2C lib name has changed.

I've looked at lcdi2c.c (written by you Smile ) and I see pinguinoi2c.c as the used lib. I see some changes in the functions, like

Code:
I2C_init(I2C_MASTER_MODE, I2C_SLEW_OFF);

and in Pinguino 9.05 I used instead:
Code:
init_I2C();

So probably this is a feature, not a bug; the problem is that it's not in the wiki... As I said, the i2c functions from the wiki doesn't work (at least in x.2 2550 board).

So, just tell me what it is and I'll try to add it to the wiki Wink


Attached Files
.pde   LectorEEPROM.pde (Size: 2.18 KB / Downloads: 7)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)