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

WDT values

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



Joined: 09 Feb 2007
Posts: 58

View user's profile Send private message

WDT values
PostPosted: Thu Feb 22, 2007 10:52 am     Reply with quote

Hello,

I am using the 18F4550 and need to know the timeout values for the watchdog timer. I know the available fuses are wdt1, wdt2, ...wdt128. Also the data sheet tells me that the timeout can be set between 4ms and 132s. However, I am not sure how to relate the fuse settings to an actual value.

Can anyone explain? My PIC is running at 48MHz and I need a timeout between 5s and 10s.

Thanks.
Ttelmah
Guest







PostPosted: Thu Feb 22, 2007 11:02 am     Reply with quote

Read section 25.2 in the data sheet.
This chip, has a much better watchdog, than most other chips, offering quite stable timings. The nominal period is 4mSec, which is then extended by the possible postscalers (1:1 - 1:32768). The WDT bits in the fuses, set this postscaler. The available values, are the 'binary' counts (1 2 4 8 etc.)
So, 5/0.004 = 1250, while 10/0.004= 2500. The only binary value between these, is 2048. This will give a nominal 2048*0.004 seconds (8.192). Use WDT2048 to get this.

Best Wishes
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