Reading the dsPIC33EP512GS502 datasheet I found that this device has a "dedicated ADC Module"...
How I can use this module?
Compiler Version 5.074 _________________ Ricardo
Last edited by RicSToz87 on Wed Aug 30, 2017 7:45 am; edited 1 time in total
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
Posted: Wed Aug 30, 2017 12:00 am
You need to look at ex_adc_epgs.c
This is the example of using the ADC on this type of chip.
There are several more things that have to be setup, than simply the master clock....
You also need to study the data sheet about which ADC accesses which input pin. You channel selection would be wrong even without the dedicated ADC (AN0 != channel 1....).
RicSToz87
Joined: 19 Feb 2017 Posts: 4
[SOLVED]
Posted: Wed Aug 30, 2017 6:54 am
Ttelmah wrote:
You need to look at ex_adc_epgs.c
This is the example of using the ADC on this type of chip.
There are several more things that have to be setup, than simply the master clock....
You also need to study the data sheet about which ADC accesses which input pin. You channel selection would be wrong even without the dedicated ADC (AN0 != channel 1....).
Thanks, Ttelmah!
Works fine as the example! _________________ Ricardo
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum