i have a problem, when i write a function to read ADC value(AN8) on mini-32 pic32 the program stops working.
But when i remove the function the program works fine i can use the touch panel.
i'm rally trying to display the result of ADC on a label created by VGLCD with no success !
this the code in the main:
Code: Select all
#include "PROJECT_objects.h"
unsigned int adc_value;
char adc_value_text[6];
void adc_function()
{
adc_value = ADC1_Read(8);
wordtostr(adc_value,adc_value_text);
ltrim(adc_value_text);
ADC_text.Caption = adc_value_text;
}
void main()
{
Start_TP();
config();
while (1)
{
Check_TP();
adc_function(); //calling ADC function
}
}