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 CCS Technical Support

Watchdog timer, yes or no and why [SOLVED]
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 9633
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Nov 10, 2015 2:10 pm     Reply with quote

You might consider putting 74123s between the PIC outputs and the laser drivers.
74123s are retriggerable one shots so if they don't get a pulse(input) after xxx ms they turn off. heck, i don't know if they exist anymore but I used thousands of them 20-30 years ago for a similar application( gas valves in my case.)


Jay
wangine



Joined: 07 Jul 2009
Posts: 98
Location: Curtea de Arges, Romania

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Tue Nov 10, 2015 2:20 pm     Reply with quote

I believe the better solution is external hardware in my case like temtronic say
temtronic wrote:
You might consider putting 74123s between the PIC outputs and the laser drivers.
Jay

Hm, i didn't think on that, and also i think is very cheap and fast response solution, because the dsPIC don't completly get stuck, just some seconds before finishing the loop with actual frame, after that it will get again a fresh rate on lasers. And yes exists and even with 2015 revision.
http://www.nxp.com/documents/data_sheet/74HC_HCT123.pdf
Thanks guys for everything share with me. Wink
PS: I edited the post because my page did't refresh and i see temtronic post after i write. Confused
Ttelmah



Joined: 11 Mar 2010
Posts: 20061

View user's profile Send private message

PostPosted: Wed Nov 11, 2015 2:03 am     Reply with quote

Yes. This is exactly what I was suggesting with:
"An example would be to have the actual drive hardware built so it always turns itself off. It requires a 'kick' (a pulse signal), perhaps every second, and if it does not receive this 'goes off' automatically. If the pulses stop, the dangerous hardware _turns itself off_".

The NE555, can also be used for this. Very available!...

Set up the timings, so that 'worst case' (temperature, tolerances of parts everything etc.), the on time is a safe period. Then kick it at less than the 'worst case" in the other direction.

This way the system will always go off if the pulses stop.

The 74123, is available now in versions like the 74VHC123A.

The MC14538B is my favourite though. Very good timing accuracies. Wire the reset line to the PIC, with a resistor so the chip is always reset till the PIC turns it on. Really wide range of supported timings, and you can trigger it with a positive or -ve pulse (depending on which input you select).
wangine



Joined: 07 Jul 2009
Posts: 98
Location: Curtea de Arges, Romania

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Thu Nov 12, 2015 3:20 pm     Reply with quote

Ttelmah wrote:

The MC14538B is my favourite though. Very good timing accuracies. Wire the reset line to the PIC, with a resistor so the chip is always reset till the PIC turns it on. Really wide range of supported timings, and you can trigger it with a positive or -ve pulse (depending on which input you select).


Yup , is done , MC14538B with
• Unlimited Rise and Fall Time Allowed on the A Trigger Input
• Pulse Width Range = 10 s to 10 s
is more than i need anyway .
Also return on watchdog point, i remove the second 18f controller because i don't need anymore. Still i made some tests, with simple functions, yes is easy to have WDT on, simply delay can reset him, but.... i don't like and personally i avoid to use delay function in any code and when you put more and more code, became insane to deal with WDT. In conclusion i will never use the watchdog, if the code is right i don't see any reason to use, my old fridge has modified with a ordinary and old 18f452 , below 2 inductive motors and years by years running in my parents home never get stuck ,,, then
code ok == don't need WDT.
Thanks everyone for advice Smile
Ttelmah



Joined: 11 Mar 2010
Posts: 20061

View user's profile Send private message

PostPosted: Thu Nov 12, 2015 3:35 pm     Reply with quote

The classic thing the watchdog _can_ be used to catch, is a spike or particle effect, that leads to the code jumping to the wrong location. Both unlikely with well designed hardware, but with proper trap code, the watchdog can then restart.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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