View previous topic :: View next topic |
Author |
Message |
j@qmail.com Guest
|
Callibrate WDT? |
Posted: Sat May 10, 2003 11:33 am |
|
|
<font face="Courier New" size=-1>I need to know how long my pic16f876 program sleeps. Apparently, watch dog timers vary quite a bit:
setup_wdt(144ms); //
sleep(); // actually slept for 170ms.
I can do one chip with my scope, but how can I do many chips? The only thing I can think of is to set-up a second chip as a "sleep timer".
In other words, put a calibration program in the first chip to communicate with the sleep timer, and then save the results in eeprom for later use by the main application.
Any other methods?
Tnx,
Jay</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 14341 |
|
![](templates/subSilver/images/spacer.gif) |
Sherpa Doug Guest
|
Re: Callibrate WDT? |
Posted: Sun May 11, 2003 3:26 pm |
|
|
:=<font face="Courier New" size=-1>I need to know how long my pic16f876 program sleeps. Apparently, watch dog timers vary quite a bit:
:=
:=setup_wdt(144ms); //
:=sleep(); // actually slept for 170ms.
:=
:=I can do one chip with my scope, but how can I do many chips? The only thing I can think of is to set-up a second chip as a "sleep timer".
:=
:=In other words, put a calibration program in the first chip to communicate with the sleep timer, and then save the results in eeprom for later use by the main application.
:=
:=Any other methods?
:=
:=Tnx,
:=Jay</font>
Beware the WDT may drift considerably with temperature or voltage changes. It is meant to be very reliable, but not very stable.
___________________________
This message was ported from CCS's old forum
Original Post ID: 14363 |
|
![](templates/subSilver/images/spacer.gif) |
Steve H. Guest
|
Re: Callibrate WDT? |
Posted: Mon May 12, 2003 8:06 am |
|
|
The WDT timer specifications are in the data sheets and they show that the WDT is not well controlled. In fact the article listed below is a link to an app note that shows how to use the WDT to measure temperature!
___________________________
This message was ported from CCS's old forum
Original Post ID: 14373 |
|
![](templates/subSilver/images/spacer.gif) |
Steve H. Guest
|
One more thing... |
Posted: Mon May 12, 2003 8:11 am |
|
|
In the past I have also used a simple serial connection to talk to the flash chips during calibration of various things. I make a serial connection, calculate the various constants required and store the cal constants in the Flash EEPROM. Then the program is written to read those values upon startup forever more (or until the next cal).
This could take care of ther initial offset, but probably not the temperature and voltage drift.
Steve H.
___________________________
This message was ported from CCS's old forum
Original Post ID: 14374 |
|
![](templates/subSilver/images/spacer.gif) |
j@qmail.com Guest
|
Re: Callibrate WDT? |
Posted: Mon May 12, 2003 10:39 am |
|
|
:=:=<font face="Courier New" size=-1>I need to know how long my pic16f876 program sleeps. Apparently, watch dog timers vary quite a bit:
:=:=
:=:=setup_wdt(144ms); //
:=:=sleep(); // actually slept for 170ms.
:=:=
Thanks for the help folks! I am going to rethink my approach.
Jay
___________________________
This message was ported from CCS's old forum
Original Post ID: 14377 |
|
![](templates/subSilver/images/spacer.gif) |
|