Matrix Keypad routine


Closed Thread
Results 1 to 40 of 135

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Maybe using Darrel's Instant Interrupts? Just an idea...

    When I have some spare time I'll try it to have a true multitasking keyboard scanner.

    Ioannis

  2. #2
    Join Date
    May 2007
    Location
    Harvest, Alabama
    Posts
    10


    Did you find this post helpful? Yes | No

    Question Pullup Resistor

    I have noted this discussion on Pull Up resistors. I am running the PIC18F series chip and it in the documentation says it supports a weak pull up setting internally in the chip. Could I get any discussion of this relative to the pull up resistors on Vcc. Also Pull Ups as I understand their function is to bring the voltage on the pin up a little so that when the transistor in the chip is triggered only slightly the pin will appear digitally to have tripped.

    As such what values do you think these resistors should be generally?

    If the support is internal, does this mean we still have to place the external resistors?

    Thanks to all.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by CluckShot View Post
    I have noted this discussion on Pull Up resistors. I am running the PIC18F series chip and it in the documentation says it supports a weak pull up setting internally in the chip. Could I get any discussion of this relative to the pull up resistors on Vcc. Also Pull Ups as I understand their function is to bring the voltage on the pin up a little so that when the transistor in the chip is triggered only slightly the pin will appear digitally to have tripped.
    As such what values do you think these resistors should be generally?
    If the support is internal, does this mean we still have to place the external resistors?
    Thanks to all.
    Generally, a pullup resistor (or a pulldown) is used to keep a pin from 'floating', which basically happens when nothing is driving the pin. The pin's voltage floats around due to induced voltages from traces around it, the weather, humidity, your hand, etc.etc...
    Another reason is that the pin might be an 'open drain' ('open collector' for older school types). This means that the pin only has a switching transistor to pull it low, and not high. So you connect a resistor of about 4.7K to Vcc across it. This provide a couple of mA (@ 5v) at most to keep the pin high.
    The internal pullups are valued at around 100K, which means they'll only provide about 50uA of current to hold it high. If you connect a load of much more than 50uA to that pin (a load resistance of much more than 100K), you'll be able to draw that pin low.
    Most likely, even though you're using the internal pullups, sometimes, depending on the outside circuitry, yes, you'll have to add a small pullup resistor.
    Generally speaking, a pullup resistor's value is either 4.7K or 10K, depending.
    Make the resistance too low, and you draw unneccessary current and it won't allow external circuitry to pull the pin low.
    Make the resistance too high, and you might not have enough current to pull the pin high like you wanted in the first place.
    Stick with 4.7K, and you should be fine.

Similar Threads

  1. calculator-like code entry with matrix keypad and display
    By Dennis in forum mel PIC BASIC Pro
    Replies: 35
    Last Post: - 16th December 2009, 22:58
  2. Need help in matrix keypad coding
    By rano_zen06 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 24th May 2008, 13:16
  3. I2C PCF8574 4X4 Keypad routine
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th January 2007, 21:25
  4. Inconsistent output on a 4x4 matrix keypad
    By markcadcam in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 24th November 2006, 03:54
  5. very basic matrix keypad question
    By kitcat in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th July 2006, 21:33

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts