Page 2 of 2

Re: Analog input not working on PIC32MZ2048ecg100

Posted: Wed Mar 04, 2020 3:07 pm
by stefan.erni
Hi Ben

The simulation is working fine.

In the hardware its' showing for all the AN signals the value from AD0. If I change the paramter from AN01 Vref to 5Volt
it' shows the the value still from AN0, but in the range of 5 volt.

AD1.PNG
(40.16 KiB) Downloaded 469 times
Clicker2_Pic32efh100-display_AD_Converter1.fcfx
(28.8 KiB) Downloaded 264 times

Re: Analog input not working on PIC32MZ2048ecg100

Posted: Fri Sep 04, 2020 3:56 pm
by stefan.erni
Hi Ben

I changed the board. Now I'm using a PIC32MZ2048efh100

In the simulation all the 5 analog channel are working fine.

In the hardware is just the AN0 working. The bad thing is that the value from AN0 is showing on all the 5Channel in the display.

I suspect flowcode does not switch to the correct analog input, it's always remains on AN0

regard

Stefan
Simulation.PNG
Simulation.PNG (6.68 KiB) Viewed 2277 times

Re: Analog input not working on PIC32MZ2048ecg100

Posted: Fri Sep 11, 2020 11:44 am
by Benj
Hello Stefan,

This could mybe be an ANSEL register problem? Please can you try the following code in a C icon and see if it makes any difference. CHange the register name and bits to match the ADC inputs you're using in your program.

Code: Select all

ANSELBbits.ANSB0 = 1;
ANSELBbits.ANSB1 = 1;
ANSELBbits.ANSB2 = 1;
If this works then I should be able to sort the component so it generates these calls for you.

Re: Analog input not working on PIC32MZ2048ecg100

Posted: Mon Sep 14, 2020 2:23 pm
by stefan.erni
Hi Ben

Microchip stopped with the PIC32MZ ECG serie
Status: Not Recommended for new designs

The new one is the PIC32MZ EFx serie.
So changed the post to the new serie and new problem and solution

https://www.matrixtsl.com/mmforums/view ... 26#p102826