I imported an Flowcode 6 program with LCD (EB005) into the Flowcode 7. This LCD is part of the free components in Flowcode 7. In the project explorer the LCD has been liated in the components, but without any macro like start , clear etc. Coversion to the hex file gives the error of missing LCD macros.
What to do?
Kind regrads
Jan Lichtenbelt
LCD EB005 without macros
Moderator: Benj
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
- 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: LCD EB005 without macros
Hi Jan,
Try using the updated files posted here and hopefully that should solve the issue for you.
http://www.matrixtsl.com/mmforums/viewt ... 63&t=17953
Try using the updated files posted here and hopefully that should solve the issue for you.
http://www.matrixtsl.com/mmforums/viewt ... 63&t=17953
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
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: LCD EB005 without macros
The next error are undefined C-variables, like osccon, etc, see attachment for details.
What to do?
With kind regards
Jan Lichtenbelt
What to do?
With kind regards
Jan Lichtenbelt
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: LCD EB005 without macros
HI
As far as I know the syntax for the boostC compiler is small letter for register names and the XC8 use capital letter
so any Code you have in a C Component you will have to adapt to the new syntax
old code = osccon new XC8 Syntax is OSCCON and bits value are as such
TRISBbits.TRISB0
Hope this helps you
As far as I know the syntax for the boostC compiler is small letter for register names and the XC8 use capital letter
so any Code you have in a C Component you will have to adapt to the new syntax
old code = osccon new XC8 Syntax is OSCCON and bits value are as such
TRISBbits.TRISB0
Hope this helps you
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: LCD EB005 without macros
One problem left. Test bit does not work.
Old:
While(ts_bit(adcon0,1));
New:
While(ts_bit(ADCON0,1));
Error message Flowcode 7:
With kind regards
Jan Lichtenbelt
Old:
While(ts_bit(adcon0,1));
New:
While(ts_bit(ADCON0,1));
Error message Flowcode 7:
What to do?while((ADCON0bits.1));
^ (195) expression syntax
(194) ")" expected ^
With kind regards
Jan Lichtenbelt
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: LCD EB005 without macros
I do not know this FC testbit function however I would expect that
you have to use the name of bit 1 as per datasheet
ADCON0bits.NAME
what controller are you using and I can help to look for the correct name
you have to use the name of bit 1 as per datasheet
ADCON0bits.NAME
what controller are you using and I can help to look for the correct name
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: LCD EB005 without macros
Dear QMESAR,
I use the xc8 compiler. Tell me where I find information about this compiler?
Thanks a lot
Jan Lichtenbelt
I use the xc8 compiler. Tell me where I find information about this compiler?
Thanks a lot
Jan Lichtenbelt
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: LCD EB005 without macros
Hi Jan
You can get a manual for the compiler at the Microchip web page ,
If you are using a PIC18 then the ADCON0 bit one is the GO/DONE bit
In the XC compiler you would use ADCON0bits.DONE however I saw a post from Martin which mentioned something about to add the over score you need to include $ sign but not sure where and how
I am also still learning FC interaction with XC8 however I am well aware of how the XC8 compiler functions in a Normal Editor
so I do not want to mislead you in this case with the DONE bit which has an over score on a second thought you probably could use ADCON0bits.GO
Ben or Martin will help us out here
You can get a manual for the compiler at the Microchip web page ,
If you are using a PIC18 then the ADCON0 bit one is the GO/DONE bit
In the XC compiler you would use ADCON0bits.DONE however I saw a post from Martin which mentioned something about to add the over score you need to include $ sign but not sure where and how
I am also still learning FC interaction with XC8 however I am well aware of how the XC8 compiler functions in a Normal Editor
so I do not want to mislead you in this case with the DONE bit which has an over score on a second thought you probably could use ADCON0bits.GO
Ben or Martin will help us out here
- Attachments
-
- 22.08.jpg (47.03 KiB) Viewed 6061 times
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: LCD EB005 without macros
You can find the names that the compiler accepts if you search in the device header file for the register name,
e.g. search for ADCON0 in ..Flowcode7\compilers\pic\include\pic16f1937.h
There you will see that this register bit is named GO_nDONE, or GO, or nDONE
So you could use:
Alternatively, if you know the bit number, and not the name, you could use the test_bit macro instead:
Hope that helps,
Leigh
ps. Just came across this generic solution too, from medelec35 http://www.matrixtsl.com/mmforums/viewt ... 26&t=17804
e.g. search for ADCON0 in ..Flowcode7\compilers\pic\include\pic16f1937.h
There you will see that this register bit is named GO_nDONE, or GO, or nDONE
So you could use:
Code: Select all
while(ts_bit(ADCON0, GO));
Code: Select all
while(test_bit(ADCON0, 1));
Leigh
ps. Just came across this generic solution too, from medelec35 http://www.matrixtsl.com/mmforums/viewt ... 26&t=17804