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
ECIO-28 - I2C
Moderator: Benj
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ECIO-28 - I2C
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
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 410 times