I/O Pin Double Duty
hmlittle59
Posts: 404
Hello All,
Before I try and possibly smoke my BS2 Pin(s), can I hook up a Piezo to a I/O pin to give a chirp when I need it and then change the pin to Input to monitor a push button switch? The Piezo would be in between the 220/10k ohm resistors. My thinking tells me this would be OK!!!
thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'M STILL LEARNING SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59
Before I try and possibly smoke my BS2 Pin(s), can I hook up a Piezo to a I/O pin to give a chirp when I need it and then change the pin to Input to monitor a push button switch? The Piezo would be in between the 220/10k ohm resistors. My thinking tells me this would be OK!!!
thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'M STILL LEARNING SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59
Comments
Would I have to manually set up the pin direction or would the (FREQOUT Piezo, 100, 4000) do that for me, then the (IF SwitchIN = 0 then ...) back to monitoring the switch work. The switch is (NO). The Piezo would be tied to Vss.
thanks again Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'M STILL LEARNING SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59
I've down loaded the WAM.2_2 and I will look that up. When you say use a INPUT before the IF statement, will I have to respond to it or is it just to change the PIN direction?
thanks again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'M STILL LEARNING SO MUCH...BUT STILL KNOW SO LITTLE!!!
hmlittle59