False Triger mega32

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mega32 with internal 1Mhz, with LCD, RTC and 4x3 Keypad.

If keypad's keys are pressed then some actions will take place like toggle of port bits, etc.

Things are wortking fine. but sometime mega32 sense the keypad inputs without being pressed. So LCD shows * chars as it is programmed to accept password.

This mega32 sense 3 times 8char length password and goes in to lock condition, without any keypad entry.

this happnes sometime if a fingure is near to mega32.

what could be the reason.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
what could be the reason.
The pull up or pull down resistors in the keypad inputs are too high in value?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As this is matrix keypad, i didnt use the resistors. Is it really necessary...
Mean time after posting my query, i found that one of the jumper wire (with insulation intact) of ground was touching the PA5, which is part of 4x3 keypad matrix.

took this wire away from the PA port and things are working now...but a wire with insulation on it can trouble a false trigger....cant trust it...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Is it really necessary...

yes, you are going to need pull-up's or pull-downs depending on how you have your keypad connected

so lets say you have the keypad connected in such a way that when a button is pressed, an AVR pin gets connected to ground, then you need a pull-up, the internal pull-ups will work fine

the reason you are getting false readings is because you don't have pull-ups. to prove this to you, set up a simple code where if you give a pin 1, it turns on a led... don't put a pull-down or anything... and just touch that pin, the led will turn on, some of the time.

I used to think that was the coolest thing when I first started AVR's.. it was like my secret buttons! but of course the code was so shady I couldn't even use it.

Last Edited: Tue. Mar 20, 2007 - 09:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
i didnt use the resistors. Is it really necessary...
You MUST have some form of pull up or pull down, even if you use the internal pull ups, otherwise the pins will be floating around. I usually use 10K external pull down resistors on matrix keypads.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly