Searching \ for 'Alarm System Code' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=alarm+system+code
Search entire site for: 'Alarm System Code'.

Truncated match.
PICList Thread
'Alarm System Code'
1999\10\30@014343 by Mike M

flavicon
face
Hey guys, me again :)

Im trying to build a real simple alarm with a 2 digit keypad.  I simply want to
be able to press the first button two times, and then make a pin HI.

Now i tried to do this through interrupts but all it did was drive all my pins c
razy, all the output pins were a pulsing low signal.  Can someone help me write
this code, again in case anyone doesnt know by now im new to PICs and pic progra
mming lanugage.

MikE
spam_OUTelektrikmanTakeThisOuTspamdynamitemail.com

Send someone a cool Dynamitemail flashcard greeting!! And get rewarded.
GO AHEAD! http://cards.dynamitemail.com/index.php3?rid=fc-41

1999\10\30@023313 by Dave VanHorn

flavicon
face
> Now i tried to do this through interrupts but all it did was drive all my
pins crazy, all the output pins were a pulsing low signal.  Can someone help
me write this code, again in case anyone doesnt know by now im new to PICs
and pic programming lanugage.

You weren't very specific, so I can only offer FAQ-level advice:

You need to debounce the buttons.
Mechanical buttons don't just close, they open and close a few times very
fast while your finger is still pushing twoard "down". The same thing
happens on the way up.

The basic approach is to notice that a button is pressed, then wait some
amount of time (1-10mS?), and check it again. If it's still low, then figure
"Pressed", and go do something. If high now, then figure "glitch", and go
back to sleep.

On the rising side, you would notice that the button is no longer pushed,
and test again after a while, and if still not pushed, then figure "Not
Pressed", otherwise figure "Still pressed, just noisy".

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...