I2C LCD
Moderator: Benj
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
I2C LCD
hi all i tried playing with a I2C driver on a 4x20 lcd and eventually got it working, im now trying to use the same principle to run a 2x16 lcd and made a short but sweet flowchart to test but in simulation seems to work but wont compile and i cant understand why HELP
- Attachments
-
- oi i2c.fcfx
- (9.4 KiB) Downloaded 219 times
- 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: I2C LCD
Hello,
You shouldn't need the I2C Master component in your project. This is setting the pins C3 and C4 up into I2C master hardware mode and this is then locking out the display component which is setup for software mode on the same pins.
Try this and see how you get on.
You shouldn't need the I2C Master component in your project. This is setting the pins C3 and C4 up into I2C master hardware mode and this is then locking out the display component which is setup for software mode on the same pins.
Try this and see how you get on.
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
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: I2C LCD
hi benj
thanks for the reply, ive tried to compile this again and get the following
cheers bob
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
520: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
521: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
522: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
523: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
524: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
534: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
536: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
538: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
540: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
570: FCP_SET(FCP_NULL, 1);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
583: FCP_SET(FCP_NULL, 1);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
587: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
593: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
594: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
595: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
596: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
597: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
600: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
602: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
604: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
606: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
611: FCP_SET(FCP_NULL, 1);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
619: FCP_SET(FCP_NULL, 1);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
623: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
667: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
668: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
669: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
670: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
671: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
672: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
oi i2c.c: FCD_04071_LCD__RawSend()
519: FCP_SET_FCP_NULL(0, , , );
^ (361) function declared implicit int (warning)
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
520: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
521: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
522: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
523: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
524: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
534: FCP_SET_FCP_NULL((FCL_NIBBLE & 0x01), , , );
(195) expression syntax ^
(194) ")" expected ^
oi i2c.c: 534: too many errors (21)
(908) exit status = 1
(908) exit status = 1
D:\flowcode 7\compilers\pic\bin\xc8.exe reported error code 1
thanks for the reply, ive tried to compile this again and get the following
cheers bob
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
520: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
521: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
522: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
523: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
524: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
534: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
536: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
538: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
540: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
570: FCP_SET(FCP_NULL, 1);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
583: FCP_SET(FCP_NULL, 1);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
587: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
593: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
594: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
595: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
596: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
597: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
600: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
602: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
604: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
606: FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
611: FCP_SET(FCP_NULL, 1);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
619: FCP_SET(FCP_NULL, 1);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
623: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
667: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
668: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
669: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
670: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
671: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
672: FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
oi i2c.c: FCD_04071_LCD__RawSend()
519: FCP_SET_FCP_NULL(0, , , );
^ (361) function declared implicit int (warning)
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
520: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
521: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
522: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
523: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
524: FCP_SET_FCP_NULL(0, , , );
^ (195) expression syntax
(194) ")" expected ^
(195) expression syntax ^
534: FCP_SET_FCP_NULL((FCL_NIBBLE & 0x01), , , );
(195) expression syntax ^
(194) ")" expected ^
oi i2c.c: 534: too many errors (21)
(908) exit status = 1
(908) exit status = 1
D:\flowcode 7\compilers\pic\bin\xc8.exe reported error code 1
- 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: I2C LCD
Hello,
Can you check the lcd_I2C component properties to ensure the pin connections are valid. Looks like you might have an unconnected pin?
If this doesn't work then try flicking the component properties e.g. from hw to sw mode and back.
If this doesn't work then try this.
Click View -> Component Debugger
Tick the "Expose full component tree" checkbox
In the properties window use the drop down menu at the top of the window.
Find the LCD component in the list
Assign pin connections to the various pins, these are not used but need to be valid for the compiler to compile the code.
Remember to untick the component debugger checkbox when you're finished.
Can you check the lcd_I2C component properties to ensure the pin connections are valid. Looks like you might have an unconnected pin?
If this doesn't work then try flicking the component properties e.g. from hw to sw mode and back.
If this doesn't work then try this.
Click View -> Component Debugger
Tick the "Expose full component tree" checkbox
In the properties window use the drop down menu at the top of the window.
Find the LCD component in the list
Assign pin connections to the various pins, these are not used but need to be valid for the compiler to compile the code.
Remember to untick the component debugger checkbox when you're finished.
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
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: I2C LCD
hi benj,
thanks for the reply ive tried your suggestions but still will not compile, i recently upgraded to 7.3 and im wondering if this is anything to do with it ???
thanks for the reply ive tried your suggestions but still will not compile, i recently upgraded to 7.3 and im wondering if this is anything to do with it ???
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: I2C LCD
hi ive just gone on another computer and tried to compile a flowchart that worked using I2C and compiled ok some months ago but this has now the same errors the only difference is that ive updated flowcode to 7.3 on both laptops is there a possible bug ???
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: I2C LCD
hi all looking through the bug reports it seems that a few people have also had various issues since upgrading to 7.3, can anyone shed any light on this as to my current problem and how do i reinstall version 7.2 to test this theory
cheers bob
cheers bob
- 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: I2C LCD
Hi Bob,
Have you applied the updates available here.
viewtopic.php?f=63&t=19743
I believe the I2C LCD was fixed as part of these.
Let us know how you get on.
Have you applied the updates available here.
viewtopic.php?f=63&t=19743
I believe the I2C LCD was fixed as part of these.
Let us know how you get on.
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
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: I2C LCD
hi benj,
ive just added the updates and it now seems to be compiling brilliant big thanks
regards bob
ive just added the updates and it now seems to be compiling brilliant big thanks
regards bob