Will this work then?
PORTB are using internal weak-pullups, and I keep RA0 high as long as I want the PIC to run.
Will this work then?
PORTB are using internal weak-pullups, and I keep RA0 high as long as I want the PIC to run.
When the push button is open you feed 9 volts to the pic input. Place a diode on each input to stop this current flow.
Cheers
Al.
All progress began with an idea
Does it look ok now?
I assume the standby current now will be 0uA when no button is pressed and the RA0 is not high?
the input to pic pins (9 volt) is limited by the 100K r and those pins should have redirect diodes (inside pic) that protects pic from overvoltage.
The opto will shutdown power or the r-c on fet gate can be made to time out (any time you set) but the power to pic then just reduces slowerly? ,,,but the brownout setting also will shut down pic before too low voltage makes program unfunctional ..
don
With reference to your schematic of post #14, please note that if you can find a switch with two contacts (common; No & Nc) then connecting the common to ground and the Nc to pic input and No to the gate of Pchan mosfet you can eliminate all the diodes.
All you need now is to assemble the circuit on a proto-board and see if it works.
Cheers
Al.
Last edited by aratti; - 29th June 2014 at 07:53.
All progress began with an idea
The datasheet says this
Does that mean that I can feed +9 into RA4?Absolute Maximum Ratings
Voltage on MCLR and RA4 with respect to VSS .................................................. ..........................................-0.3 to +14V
Voltage on all other pins with respect to VSS .................................................. ..................................-0.3V to VDD + 0.3V
And if not why should this be avoided?
from the data sheet for 18f2550. the diode pointing to vcc holds the voltage at the pin to 5 volts (or the supply voltage) as long as the current is under max-rating, generally 25ma. So limiting current way below that is safe operation. Your 78xx volt reg will keep the vcc voltage to the 5 volts.
data sheet from 16f device shows the diodes in the pin input.
don
Absolute maximum means it's the limit, at your own risk, no guarantees. Avoid unless you like magic smoke tricks.
Check the other section where it says recommended or something (can't remember exact words), but it'll most likely have a range of 0 to 5 volts or so.
Robert
Edit: check up voltage dividers.
Bookmarks