Page 1 of 1

Hex compile error

Posted: Fri Jun 18, 2021 1:50 am
by alanwms
Hello - I'm working with FC5 due to an old program I am updating. A few questions:

1. The program will not compile to Hex - Give me an error 120 telling me about C code.
I do have I block with C code changing the osccon and intcon. I deleted this block, and the 120 error remains.

2. Can this program be imported into my FC9?

I think I experienced the 120 error before, and overcome it but don't remember. I searched the forum without luck.

Can you assist?
FLOWCODE 5 Dracular BUZZ WC100218-1910.fcf
(266.72 KiB) Downloaded 192 times

Re: Hex compile error

Posted: Fri Jun 18, 2021 8:32 am
by medelec35
Hi.
The attached FC9 version compiles OK for me.

Re: Hex compile error

Posted: Fri Jun 18, 2021 10:00 pm
by alanwms
Thanks Martin - How did you convert to FC9?

Re: Hex compile error

Posted: Fri Jun 18, 2021 11:00 pm
by medelec35
You're welcome.
I have all Flowcode versions from v3.
v6 and V7 allow you to convert the older fcf type to the newer fcfx.
I also had to modify the C code so it's XC8 compatible.
Is the v9 version working for you?

Re: Hex compile error

Posted: Mon Jun 21, 2021 3:11 am
by alanwms
The converted file is working for me - A few hickupps, mainly for the analog inputs. I used to have a number in the program looking for <1500. Now that code only works with <500.

I think I have concluded that the FC9 thinks that the pic18f2553 is an 8 bit analog - It's actually 12 bits (4096)

I'm trapping the DC voltage and running an eeprom save below a certain value - My sample voltage is developed from the 17VDC power using a potential divider, bringing me to around 4V. When the DC analog is around 2.5V I presume the power is going away, and Irun the eeprom save routing which saves all my values for next power up - Works great.

I checked the voltage on the AN input and the routine runs at 2.5V which should equate to around 2000 counts. It thinks that 500 counts is around 2.5V.

Should I post this on the V9 site? DId you want to take a quick look at that?

I have the older FC versions too, and will familiarize myself with the conversion process. Thank you

Re: Hex compile error

Posted: Mon Jun 21, 2021 8:09 am
by medelec35
Hi.
alanwms wrote:
Mon Jun 21, 2021 3:11 am
I checked the voltage on the AN input and the routine runs at 2.5V which should equate to around 2000 counts. It thinks that 500 counts is around 2.5V.

Should I post this on the V9 site? DId you want to take a quick look at that?
If you post it on the V9 site, it will help anyone else who has v9 and facing the same issue.
I have resolved a similar issue before.

Re: Hex compile error

Posted: Mon Jun 21, 2021 3:57 pm
by alanwms
Thanks Martin