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

Callibrate WDT?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
j@qmail.com
Guest







Callibrate WDT?
PostPosted: Sat May 10, 2003 11:33 am     Reply with quote

<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
Sherpa Doug
Guest







Re: Callibrate WDT?
PostPosted: Sun May 11, 2003 3:26 pm     Reply with quote

:=<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
Steve H.
Guest







Re: Callibrate WDT?
PostPosted: Mon May 12, 2003 8:06 am     Reply with quote

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
Steve H.
Guest







One more thing...
PostPosted: Mon May 12, 2003 8:11 am     Reply with quote

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
j@qmail.com
Guest







Re: Callibrate WDT?
PostPosted: Mon May 12, 2003 10:39 am     Reply with quote

:=:=<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
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