> For the MOSFET driver, your suggested pull-up resistor is > usually a bad idea because it will cause the solenoid to > come on if the PIC output is high impedance for any reason > (eg. during startup), or if the PIC is unplugged. One technique I have used is to switch the pull-xxxx resistor (or schottky diode clamp) based on an I/O that goes high impedance during reset. The pin needs to be actively set to enable the output driver transistors, etc. > >Sorry to be picky, but newbies especially should be VERY > >conservative with all their ratings. Both newbies and oldbies need to pay attention to the reset state and what happens when a watchdog occurs. I've seen so many products where this is ignored and some of them are really scary. A typical scenario would be a fet that turns on while the micro is in reset, attached to an under-rated power supply. Power comes up at the normal rate, fet turns on, adding larger load onto power supply, power supply sags, fet turns off, light load on supply, supply recovers, power comes up, fet turns on,...... Net result = 50% PWM on solenoid controlling hydraulic ram. Ouch ! A similar situation occurs a lot of the time when outputs are turned on by the micro under software control. You might have a reset generator that monitors supply voltage and adds a few milliseconds of delay but that's not long in power supply terms. If you turn on all your loads straight away you get a similar situation to that above. Also in that category is misuse of watchdogs. Wonderful things but should be regarded like airbags - only used when all else has failed and should deploy in a useful way. Ones that restart the system and do the same thing that led to the watchdog in the first place are of limited use in many situations. Steve. ====================================================== Steve Baldwin Electronic Product Design TLA Microsystems Ltd Microcontroller Specialists PO Box 15-680, New Lynn http://www.tla.co.nz Auckland, New Zealand ph +64 9 820-2221 email: steveb@tla.co.nz fax +64 9 820-1929 ====================================================== -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu