PIC18F2523 Analog Resolution error

Post and discuss new components that you have created.
DavidBotha_1
Posts: 12
http://meble-kuchenne.info.pl
Joined: Fri Dec 18, 2020 8:35 am
Been thanked: 1 time

PIC18F2523 Analog Resolution error

Post 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.

medelec35
Matrix Staff
Posts: 1466
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 515 times
Been thanked: 474 times

Re: PIC18F2523 Analog Resolution error

Post 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.
Attachments
18F2523.fcdx
(26.74 KiB) Downloaded 136 times
Martin

DavidBotha_1
Posts: 12
Joined: Fri Dec 18, 2020 8:35 am
Been thanked: 1 time

Re: PIC18F2523 Analog Resolution error

Post 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.

medelec35
Matrix Staff
Posts: 1466
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 515 times
Been thanked: 474 times

Re: PIC18F2523 Analog Resolution error

Post 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.
Martin

DavidBotha_1
Posts: 12
Joined: Fri Dec 18, 2020 8:35 am
Been thanked: 1 time

Re: PIC18F2523 Analog Resolution error

Post by DavidBotha_1 »

Hi medelec.

My apologies for the late reply.

I hope the attachments help.

Thank you
Attachments
PIC18F2523 12Bit ADC Test .hex.zip
(2.02 KiB) Downloaded 130 times
PIC18F2523 12Bit ADC Test .C.zip
(6.34 KiB) Downloaded 136 times

medelec35
Matrix Staff
Posts: 1466
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 515 times
Been thanked: 474 times

Re: PIC18F2523 Analog Resolution error

Post 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 3557 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?
Martin

DavidBotha_1
Posts: 12
Joined: Fri Dec 18, 2020 8:35 am
Been thanked: 1 time

Re: PIC18F2523 Analog Resolution error

Post 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
Attachments
PIC18F2523 12Bit ADC Test.fcfx
(14.01 KiB) Downloaded 128 times

medelec35
Matrix Staff
Posts: 1466
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 515 times
Been thanked: 474 times

Re: PIC18F2523 Analog Resolution error

Post 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.
Martin

DavidBotha_1
Posts: 12
Joined: Fri Dec 18, 2020 8:35 am
Been thanked: 1 time

Re: PIC18F2523 Analog Resolution error

Post 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.

medelec35
Matrix Staff
Posts: 1466
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 515 times
Been thanked: 474 times

Re: PIC18F2523 Analog Resolution error

Post 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.
Martin

Post Reply