View previous topic :: View next topic |
Author |
Message |
z3ngew
Joined: 20 Apr 2013 Posts: 50
|
wdt in PIC |
Posted: Thu May 16, 2013 3:05 pm |
|
|
Hello everyone,
Can watch dog timer which is implemented in the pic hardware be used as a regular timer, and if yes, please provide code snippet if possible?
Thanks in advance,
z3ngew |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Thu May 16, 2013 3:10 pm |
|
|
why not just use a regular timer? 0,1,2,3,... depending on pic.. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
z3ngew
Joined: 20 Apr 2013 Posts: 50
|
|
Posted: Thu May 16, 2013 3:18 pm |
|
|
well, i am planning to use the other timers to make an interrupt multitasking system that will enable me to operate more that one RC servo motor at the same time, but not with the same behavior, so i was wondering if wdt can be used like regular timer, it would be helpful for me,
thanks, |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu May 16, 2013 3:25 pm |
|
|
Watchdog timer capabilities vary widely, depending on the PIC. Always
post your PIC. |
|
|
z3ngew
Joined: 20 Apr 2013 Posts: 50
|
|
Posted: Thu May 16, 2013 3:30 pm |
|
|
I'm using PIC18F452 |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1911
|
|
Posted: Thu May 16, 2013 3:31 pm |
|
|
The biggest problem with the watchdog is that it isn't a precise timing source.
The second is that a watchdog expiry causes a processor reset. Relying on that is very poor coding practice. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Thu May 16, 2013 4:52 pm |
|
|
Quote: |
more that one RC servo motor
|
rc pulse position servos right ??
Unless you are doing something that requires sub usec control
one timer, a 16 mhz crystal and some clever code ought to do the trick.
have you searched HERE using
RC servo
as the search term ??? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9269 Location: Greensville,Ontario
|
|
Posted: Thu May 16, 2013 5:24 pm |
|
|
Even the 'ancient' 16C84 can handle 8 'rc servos' and a serial interface at 9600 baud. |
|
|
|