|
|
View previous topic :: View next topic |
Author |
Message |
nilsener Guest
|
18F452 and WDT |
Posted: Tue Jul 16, 2002 9:50 am |
|
|
Dear,
I use a 18F452 and #fuses WDT128 to configure the watchdog timer.
Does anyone know what WDT128 means in milliseconds ?
What are the other valid commands to get longer/shorter times ?
Thanks for helping
___________________________
This message was ported from CCS's old forum
Original Post ID: 5569 |
|
|
Joe Harris Guest
|
Re: 18F452 and WDT |
Posted: Tue Jul 16, 2002 10:01 am |
|
|
From fuses.txt
WDT1 Watch Dog Timer uses 1:1 Postscale
WDT2 Watch Dog Timer uses 1:2 Postscale
WDT4 Watch Dog Timer uses 1:4 Postscale
WDT8 Watch Dog Timer uses 1:8 Postscale
WDT16 Watch Dog Timer uses 1:16 Postscale
WDT32 Watch Dog Timer uses 1:32 Postscale
WDT64 Watch Dog Timer uses 1:64 Postscale
WDT128 Watch Dog Timer uses 1:128 Postscale
I'm pretty sure wdt128 is 128ms.
:=Dear,
:=
:=I use a 18F452 and #fuses WDT128 to configure the watchdog timer.
:=Does anyone know what WDT128 means in milliseconds ?
:=What are the other valid commands to get longer/shorter times ?
:=
:=Thanks for helping
___________________________
This message was ported from CCS's old forum
Original Post ID: 5570 |
|
|
johnpcunningham Guest
|
Re: 18F452 and WDT |
Posted: Tue Jul 16, 2002 10:38 am |
|
|
<font face="Courier New" size=-1>According to the SPEC a watchdog typ. timeout is 18ms. The postscaler changes this timeout period, so no postscale value (i.e 1:1 is 18ms). A postscale value of 1:128 is 128*18ms = 2.304 seconds. simply take the postcale ratio value (i.e 1:2, 1:4, etc) adn multiply it by 18ms. The actual WDT timeout will vary from chip to chip and with different temperatures. It is not that accurate; 2.304 seconds could vary from 2.1 to 2.5 seconds from my general tests.
JC</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 5575 |
|
|
R.J.Hamlett Guest
|
Re: 18F452 and WDT |
Posted: Wed Jul 17, 2002 2:16 am |
|
|
:=<font face="Courier New" size=-1>According to the SPEC a watchdog typ. timeout is 18ms. The postscaler changes this timeout period, so no postscale value (i.e 1:1 is 18ms). A postscale value of 1:128 is 128*18ms = 2.304 seconds. simply take the postcale ratio value (i.e 1:2, 1:4, etc) adn multiply it by 18ms. The actual WDT timeout will vary from chip to chip and with different temperatures. It is not that accurate; 2.304 seconds could vary from 2.1 to 2.5 seconds from my general tests.
:=
Actually the variation is a _lot_ larger, especially on some of the early 18F452's.
The data sheet gives the minimum watchdog timeout as just 6mS, and I have had one group of chips that watchdogged out, in less than 1 second, with WDT128 selected. :-(
Other chips like the 16F877, seem to keep the watchdog values 'tighter', with a variation of perhaps 10 to 20\% (corresponding to the sort of values you have seen).
My problems came when testing at extreme temperatures (cycling between the limits for the chip), so are perhaps unlikely to be met in general, but I'd allow at least +/-50\%, when designing code, to have a good chance of avoiding problems from this...
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 5603 |
|
|
johnpcunningham Guest
|
Re: 18F452 and WDT |
Posted: Wed Jul 17, 2002 7:29 am |
|
|
Thanks for the information. I haven't use the PIC18s as of yet but I'm surprised that the WDT varies that much more that the PIC16s. Microchip must have made a major die change to the internal RC that runs the WDT if I were to guess.
___________________________
This message was ported from CCS's old forum
Original Post ID: 5614 |
|
|
R.J.Hamlett Guest
|
Re: 18F452 and WDT |
Posted: Wed Jul 17, 2002 10:12 am |
|
|
:=Thanks for the information. I haven't use the PIC18s as of yet but I'm surprised that the WDT varies that much more that the PIC16s. Microchip must have made a major die change to the internal RC that runs the WDT if I were to guess.
Yes. It may be a problem with the early chips only, since I met this with a batch of five, sent directly from MicroChip in the US, when the 18F252, and 452, were brand new, and were not yet available in the UK. I was 'porting' code that had originally been prototyped on the 16F877, and found it was occasionally watchdogging, despite the watchdog being cleared in a 1/sec interrupt, when using the 1/128 prescaler. I queried it with MicroChip, and they pointed out that the full 'range' for the WDT timeout, is allowed to be 7 to 33mSec, which at the 'short' end, only corresponds to 0.896 seconds with the max prescaler!.
So to cover 'all' cases of temperature and voltage, your code has to accept this wide range. The older chips have a similarly wide range on the data sheets, but I have never seen a chip even get close to the shorter end of the time.
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 5622 |
|
|
nilsener Guest
|
Re: 18F452 and WDT |
Posted: Thu Jul 18, 2002 2:52 am |
|
|
Thanks a lot for your helpful informations
___________________________
This message was ported from CCS's old forum
Original Post ID: 5640 |
|
|
Guest
|
|
Posted: Sun Nov 13, 2005 2:00 pm |
|
|
4ms on PIc18F4525 |
|
|
|
|
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
|