Start / Stop button. Please help

Status
Not open for further replies.

cubdh23

New Member
Hello i am using a switch that has 3 pins and it should do start and stop
I am using built in pull up resistors and when i connect all 3 pins to the microcontroller. It freezes. When i take off one pin then it works. I have used diferent switches and all seem to do the same thing. There are 3 pins named "C" " NO" and "NC" I have no idea what those mean but when its on C and NO are continous when its off C and NC are contious or vice versa . So i guess C is common. But only C and NO works together. When i do C and NC and i reset my controller it freezes. If i take off the pin reset then place the pin back then it works. but doesnt work if its on and i reset. Any suggestions on what im doing wrong? Greattttttly appreciated.

Wood pitches next week
Prior too
 
C is common, NC is normally closed, NO is normally open
meaning NC is closed while the switch is not depressed, NO is open while the switch is not depressed.
kinda hard to troubleshoot without seeing the code or circuit, try posting the code...

-I just reread your post and have no idea what this means: "i connect all 3 pins to the microcontroller" need a little more info
 
OK let me be a little more specific.
Im using motorola 6812
lets say i use pin 0 for NC pin 1 for C and pin 2 for NO.
I make pin 1 output thereby making it ground.
I make pin 0 and pin 2 input with pull up resistor enabled.
When i get a falling edge on 0 and 2 it interrupts to respective zones.
So what im doing is by connecting Common to either pin 0 or pin 2, it causes the pin to go from high to low thereby interrupting. This works only if i reset then stick in the pins. If i stick in the pins then reset, it freezes. Im not using any circuitry. I dont really understand exactly how the switch works. Im wondering if its pulling current or something thats causing it to freeze. dont know
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…