Page 1 of 2

PIC18F2523 Analog Resolution error

Posted: Mon Oct 24, 2022 5:35 am
by DavidBotha_1
Hi.

I am currently using a PIC18F2523 for its 12Bit analog resolution features.

The flowchart simulates correctly, the program compiles and loads onto my processor correctly
however when the code is running on my hardware, the analog resolution is defaulting to 10Bit.

The error I am experiencing is similar to a previous post in the "Bug " Forum where a user was using a PIC18F2553. I think the fault was due to the flowcode compiler defaulting to 10Bit for that device and am wondering if this is not the same error for the device which I am using?

I have downloaded all of the updates available however the result is the same.

Any help is much appreciated.

Re: PIC18F2523 Analog Resolution error

Posted: Mon Oct 24, 2022 11:54 am
by medelec35
Hello DavidBotha_1
Thank you for the spot.
I have created a temporary fix, and it will be pushed onto the update system as soon as possible.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PIC
Replace the existing file with the attached file.
Hopefully, 12bit will work on your hardware as well.

Re: PIC18F2523 Analog Resolution error

Posted: Mon Oct 24, 2022 2:46 pm
by DavidBotha_1
Hi medelec35

Thank you for the prompt response.

I have tried the "Quick fix" however the hardware response is still the same.

As you may notice I have attempted the 18F2523.fcdx download 3 times, rebooted my pc etc however am at the same point.

Not sure what I should do or try next?

Thank you once again.

Re: PIC18F2523 Analog Resolution error

Posted: Mon Oct 24, 2022 3:07 pm
by medelec35
You're welcome.
Can you please post your project .C file & .hex file.
To post any files you need to select Full Editor & Preview at the bottom of the reply within and select the Attachments tab.
It would be best to zip the files up as .hex files are not accepted within attachments

I also should have mentioned that after replacing the 18F2523.fcdx file, Flowcode will require reloading.
But you have taken care of that by rebooting your PC.

Re: PIC18F2523 Analog Resolution error

Posted: Mon Oct 24, 2022 4:59 pm
by DavidBotha_1
Hi medelec.

My apologies for the late reply.

I hope the attachments help.

Thank you

Re: PIC18F2523 Analog Resolution error

Posted: Mon Oct 24, 2022 6:01 pm
by medelec35
Hi David.
I have attached an image of what your C code looks like and what it should look like if the file attached in my above post is used:
Project Comparisons.png
Project Comparisons.png (122.69 KiB) Viewed 3967 times
The arrow is showing the line that must be present for the 12bit ADC to work.
Can you please confirm the full path of the folder you placed the file?
Are you using a 64 or 32-bit PC?

Re: PIC18F2523 Analog Resolution error

Posted: Mon Oct 24, 2022 9:07 pm
by DavidBotha_1
Hi medelec.
I am using a 64bit PC.

My apologies, I am not very computer literate so I am not sure how to provide the "full path folder" which you are asking for?

Maybe the fcfx file may help

Re: PIC18F2523 Analog Resolution error

Posted: Mon Oct 24, 2022 10:10 pm
by medelec35
Hi David, I'm the one who should apologise.
You have not done anything wrong.
I have relised that I have posted the wrong file path.
The path is just all the directories within the C drive.
For example, the correct path is:

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PIC
C:\ProgramData is hidden by default.
So your best way is to copy and paste:

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PIC
into windows explorer.
After adding the file, if Flowcode is already running then you will need to reload your project.
You can do that by clicking on the reload icon at the top, next to the save icon.
If Flowcode is closed you can just open it as normal.

Re: PIC18F2523 Analog Resolution error

Posted: Tue Oct 25, 2022 5:12 am
by DavidBotha_1
Hi medelec

Thank you for your patience and perseverance.
The latest file path and patch works. I cannot thank you enough.

Just to let you know, after the patch file was loaded and Flowcode was launched, the update window pops up with an update for the 18F2523. If the update is downloaded, it replaces the patch. I am sure you know about this non the less.

Thank you once again.

Re: PIC18F2523 Analog Resolution error

Posted: Tue Oct 25, 2022 8:01 am
by medelec35
Hello.
You're welcome.
I'm glad you are sorted now & sorry for the inconvenience.
Yes as the patch file is not via the update system, therefore it will be treated as not genuine.
For that reason, Flowcode will show you will need an update.
The required update, won't be available until tomorrow.
The time you will be able to update is when the file shows revision 4.
I will post within this topic when the update is available.