|
|
View previous topic :: View next topic |
Author |
Message |
nazoa
Joined: 09 Feb 2007 Posts: 58
|
WDT values |
Posted: Thu Feb 22, 2007 10:52 am |
|
|
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
|
|
Posted: Thu Feb 22, 2007 11:02 am |
|
|
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 |
|
|
|
|
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
|