Page 1 of 1

ECIO-28 - I2C

Posted: Thu Oct 07, 2010 3:22 pm
by pmr1
Hi, I have a compiled a simple programme to access the I2C bus, but the compiler throws an exception

C:\teaching\b38DB\display3.c(250:4): error: unknown identifier 'trisd'
C:\teaching\b38DB\display3.c(250:4): error: invalid operand 'trisd'
C:\teaching\b38DB\display3.c(250:11): error: failed to generate expression
C:\teaching\b38DB\display3.c(251:4): error: unknown identifier 'trisd'
C:\teaching\b38DB\display3.c(251:4): error: invalid operand 'trisd'
C:\teaching\b38DB\display3.c(251:11): error: failed to generate expression


Referring to Port D which does not exist on Pic18F2455. Operation is is in setting the IO pins for I2C bus.

Any ideas ?

Paul

Re: ECIO-28 - I2C

Posted: Thu Oct 07, 2010 4:18 pm
by Benj
Hello Paul,

I think the problem is due to the fact that the ECIO28 doesn't have PortD.

Check your component connections and any input / ouput icons and make sure that none of them are referencing PortD. If you look at lines 250 and 251 of the C code then you should be able to spot which Flowcode icon is referring to PortD.

Otherwise post up your program and I will have a look.

Re: ECIO-28 - I2C

Posted: Tue Oct 12, 2010 1:44 pm
by pmr1
Hi Benj,

Code attached. When blown into ECIO 28 I2C pins on port B just generate a single square pulse. BTW the port D problem goes away if you select software settings on I2C component properties and select bits 1 and 0. This should be the default setting for the 28 pin Pic18F2455.

Regards

Paul

Re: ECIO-28 - I2C

Posted: Tue Oct 12, 2010 1:45 pm
by pmr1
Further to my last post. This test code works fine on on a PIC18F452.