ON/OFF button for PIC16f877a (ambiguity)
irilias
Posts: 3
Hi, I'm very new to microcontrollers and i need an ON/OFF button for my sphygmomanometer project to turn it off and on and i don't know if i did the wiring of the pic the right way or
not ?
if it's correct, does turning ON & OFF the pic (the way i wired it) could make any firmware glitches or some other problems ? , i'm using pic16f877a ..
i'm new at this so please bear with me (and excuse my poor english,it's not my native language).. any help at all would be much appreciated, thanks in advance .
not ?
if it's correct, does turning ON & OFF the pic (the way i wired it) could make any firmware glitches or some other problems ? , i'm using pic16f877a ..
i'm new at this so please bear with me (and excuse my poor english,it's not my native language).. any help at all would be much appreciated, thanks in advance .
Comments
As a side note, I would say no, your circuit is not correct. When the button is pressed, it shorts VCC to VDD, and otherwise leaves VDD floating. Alltogether, it doesn't look correct. I would suggest looking at the Pic datasheet for some example circuits.
If you have sensors attached to your microcontroller and these are not running off the microcontroller Vdd / Vss lines, you can damage the microcontroller if the sensors are powered when the microcontroller is not powered.
This sort of thing applies to any microcontroller including the Stamps and the Propeller. The Stamp module has a filter capacitor across the Vdd / Vss power lines which would avoid the bouncing issue.
yes Mr. Green i do have an MPX2050 piezoresistive pressure sensor (supplied 10V) attached to the MCU through some AOPs (supplied 5V each) the AD620 and OPA2277.. could that make a problem ? considering the way i wired the ON/OFF switch ?
and also a 6v electro-valve ?! should i make any changes ?.. thank you so much in advance
The easiest solution is to have all your power sources derived from the same power supply and to turn that on and off.