I'm using the PIC to drive the gate of a n-channel mosfet. The fet controls a small, fast-acting solenoid. Code snippet as follows:
low porta.1
(some code here)
pulsout porta.1,100 'pulse the solenoid on for 1 ms
Everything works fine except for this:
When power is first supplied to the PIC the solenoid will briefly turn on by itself. Obviously, the fet is coming on during start-up. Is there a way to stop this?
Bookmarks