CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 5 matches
CCS Forum Index
Author Message
  Topic: ADC, floating point and interrupts
xieliwei

Replies: 11
Views: 17273

PostForum: General CCS C Discussion   Posted: Sun Nov 13, 2011 11:41 am   Subject: ADC, floating point and interrupts
Add a diagnostic at the start, to find what the restart cause is.
Also post the fuses used.
The comment about sno, still applies though. Just have a second counter like curradc, set it to 3 on boot, ...
  Topic: ADC, floating point and interrupts
xieliwei

Replies: 11
Views: 17273

PostForum: General CCS C Discussion   Posted: Sun Nov 13, 2011 11:23 am   Subject: ADC, floating point and interrupts
Hmm, hang on...

Making the stack size change does fix the problem with the actual code! That's why experience is important! Thank you Ttelmah and others! Razz

Now I wonder what's causing the ...
  Topic: ADC, floating point and interrupts
xieliwei

Replies: 11
Views: 17273

PostForum: General CCS C Discussion   Posted: Sun Nov 13, 2011 10:44 am   Subject: ADC, floating point and interrupts
Try increasing the default stack size.
By default on the PIC24, the value selected is too low, especially if you start using things like floating point printf....

Best Wishes

After adding:
#bu ...
  Topic: ADC, floating point and interrupts
xieliwei

Replies: 11
Views: 17273

PostForum: General CCS C Discussion   Posted: Sun Nov 13, 2011 10:27 am   Subject: ADC, floating point and interrupts
Thank you for your replies!

Sorry that I didn't provide the full code earlier, was in a hurry to attend to something.

Here is the full skeletal code (with suggested changes) that replicates the ...
  Topic: ADC, floating point and interrupts
xieliwei

Replies: 11
Views: 17273

PostForum: General CCS C Discussion   Posted: Sun Nov 13, 2011 1:36 am   Subject: ADC, floating point and interrupts
I'm facing a problem trying to get a piece of code working. After some testing, it appears that my floating point operations and printing gets interrupted by the ADC interrupt.

Here's a condensed v ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group