Page 1 of 1
LCD EB005 without macros
Posted: Mon Aug 22, 2016 4:33 pm
by Jan Lichtenbelt
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
Re: LCD EB005 without macros
Posted: Mon Aug 22, 2016 4:39 pm
by Benj
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
Re: LCD EB005 without macros
Posted: Mon Aug 22, 2016 7:00 pm
by Jan Lichtenbelt
The next error are undefined C-variables, like osccon, etc, see attachment for details.
What to do?
With kind regards
Jan Lichtenbelt
Re: LCD EB005 without macros
Posted: Mon Aug 22, 2016 7:05 pm
by QMESAR
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

Re: LCD EB005 without macros
Posted: Mon Aug 22, 2016 7:20 pm
by Jan Lichtenbelt
One problem left. Test bit does not work.
Old:
While(ts_bit(adcon0,1));
New:
While(ts_bit(ADCON0,1));
Error message Flowcode 7:
while((ADCON0bits.1));
^ (195) expression syntax
(194) ")" expected ^
What to do?
With kind regards
Jan Lichtenbelt
Re: LCD EB005 without macros
Posted: Mon Aug 22, 2016 7:27 pm
by QMESAR
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

Re: LCD EB005 without macros
Posted: Mon Aug 22, 2016 9:00 pm
by Jan Lichtenbelt
Dear QMESAR,
I use the xc8 compiler. Tell me where I find information about this compiler?
Thanks a lot
Jan Lichtenbelt
Re: LCD EB005 without macros
Posted: Mon Aug 22, 2016 9:24 pm
by QMESAR
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

Re: LCD EB005 without macros
Posted: Tue Aug 23, 2016 9:03 am
by LeighM
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