Hi
When I set interrupt frequency to 8khz and use adc base to catch analog input then save it to file, it works. But when I try to set interrupt to more frequent value (16khz or faster) it reboots the controller. Even I am not using save to file function (just accumulate values and calculate the average for every 5 catches).
Also there's another problem. When I try to use GetAverageByte it freezes the whole chip. I've played with adc settings but nothing helped.
This is the reason why I've made my own average algorythm in adc_read macro.
Some screenshots are below. The whole project is big so I don't publish it here.
Any advices are appreciated.
chip is pic24fj64ga
adc and pic24
Moderator: Benj
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
adc and pic24
- Attachments
-
- sc-adc-2.gif (17.69 KiB) Viewed 5259 times
-
- sc-adc-1.png
- (4.91 KiB) Downloaded 2847 times
FC 6.1.3.2 (18.02.2016)
Re: adc and pic24
mikn wrote:Hi
When I set interrupt frequency to 8khz and use adc base to catch analog input then save it to file, it works. But when I try to set interrupt to more frequent value (16khz or faster) it reboots the controller. Even I am not using save to file function (just accumulate values and calculate the average for every 5 catches).
Also there's another problem. When I try to use GetAverageByte it freezes the whole chip. I've played with adc settings but nothing helped.
This is the reason why I've made my own average algorythm in adc_read macro.
Some screenshots are below. The whole project is big so I don't publish it here.
Any advices are appreciated.
chip is pic24fj64ga
Hi,,
have you seen this
http://www.matrixmultimedia.com/mmforum ... 790#p59641
can you try this ?
Best wishes!
Rudi
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: adc and pic24
Some more troubles.
I've added cal_adc to my project.
Pressed twice on current macro block, changed it from adc_base.getbyte to cal_adc.sample.
Then when I press to field Sample I get error and FC closes.
I've added cal_adc to my project.
Pressed twice on current macro block, changed it from adc_base.getbyte to cal_adc.sample.
Then when I press to field Sample I get error and FC closes.
FC 6.1.3.2 (18.02.2016)
Re: adc and pic24
You are not allone i am with youmikn wrote:Some more troubles.
I've added cal_adc to my project.
Pressed twice on current macro block, changed it from adc_base.getbyte to cal_adc.sample.
Then when I press to field Sample I get error and FC closes.
http://www.matrixmultimedia.com/mmforum ... 885#p60221
I work in PIC18F2550, because PIC24 do not like me but i think this is a general goes wrong.
Best wishes
Rudi
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: adc and pic24
yeah, seems like FC is more friendly to atmel rather than to microchip..
FC 6.1.3.2 (18.02.2016)
Re: adc and pic24
ha ha ha .... an advantage does that have: You learn a lot in this short time. Try Serach Try ... Try Search Try i am sure ..everything will be fine.. and If the test phases of the woods, then FC6 is the best thing ever. While it sucks immensely - but it seems to us also benefit - ... Microchip usersmikn wrote:yeah, seems like FC is more friendly to atmel rather than to microchip..