ECIO-28 - I2C

Moderator: Benj

Post Reply
pmr1
Flowcode V4 User
Posts: 12
Joined: Tue Apr 24, 2007 1:55 pm
Location: Edinburgh
Contact:

ECIO-28 - I2C

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ECIO-28 - I2C

Post 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.

pmr1
Flowcode V4 User
Posts: 12
Joined: Tue Apr 24, 2007 1:55 pm
Location: Edinburgh
Contact:

Re: ECIO-28 - I2C

Post 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
Attachments
display31.fcf
(6 KiB) Downloaded 352 times

pmr1
Flowcode V4 User
Posts: 12
Joined: Tue Apr 24, 2007 1:55 pm
Location: Edinburgh
Contact:

Re: ECIO-28 - I2C

Post by pmr1 »

Further to my last post. This test code works fine on on a PIC18F452.

Post Reply