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 support@ccsinfo.com

Problems setting up WDT and timer1

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Oct 07, 2008 11:00 am     Reply with quote

Quote:

I can't seem to restart the wdt.

While running the ICD, I halt the program and find values less than 0xFF00.

I don't know about the CCS ICD, but the help file for the Microchip ICD2
says this:
Quote:
Debugger Limitations
The Watchdog Timer (WDT) cannot be used when debugging.

The CCS ICD probably has the same limitation.
tvlodek



Joined: 29 Jan 2008
Posts: 3

View user's profile Send private message

PostPosted: Tue Oct 07, 2008 11:51 am     Reply with quote

I tried running the board stand alone and it still won't run right. I was able to set the wdt for sleep mode (divide by 1) then changed it to 2304MS and it was running right, I still wasn't able to set timer1 correctly but I only needed to get the timing right. Now I'm back to the drawing board.... As soon as I press the "run" button, it goes back to sleep, even though I attempt to clear the wdt numerous times in the ISR...... That, and MPLAB is just a pain in the neck, hanging up my computer, watching the hourglass for 5 minutes at a time, etc...... I don't know if this is a MPLAB thing or what..... Maybe I'll try running out of the CCS IDE.....
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Oct 07, 2008 11:59 am     Reply with quote

Post a very short program that demonstrates the problem. Here's an
example of what I mean:
http://www.ccsinfo.com/forum/viewtopic.php?t=28158&start=8
It's super short, and it shows how to wake up from sleep with Timer1.

The program that you post must be compilable without errors. It must
have the #include, #fuses, #use delay(), main(), variable declarations,
etc. Don't put in any Wizard code that is unrelated to demonstrating
the problem. i.e., don't put in code to setup the A/D, when your
problem is about the WDT. Most importantly, the program must be short.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group