looking for pointers, tips, etc...


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    This depends alot on how your keypad is wired, and how many resistors there are in the circuit, but there's a possibility you have a short circuit waiting to happen.

    By setting PORTB to either High or LOW states, if you accidently press 2 buttons (on different colums), it put's a dead short across the outputs of the PIC.

    Typically, it causes the PIC to reset before it can do any real damage. But over time it will take it's toll on the equipment. Especially the keypad.

    It's better to control the TRIS register, so that only 1 column has an active output at any given time.

    I know you're trying to do it yourself, but you might want to take a look at ...

    keyx.bas - PICBASIC PRO program to display key number on LCD http://www.melabs.com/resources/samples/x1/pbp/keyx.bas

    HTH,
    DT

  2. #2
    Join Date
    Apr 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Thank you...

    Hello Darrel,

    Thank you for the tip. I did realize the short circuit situation and added series resistors in line with the row bits.

    However, your tip is better because I can eliminate those resistors and gain some space on the board. controling the Tris register rather then setting bit high or low.

    I looked over the code example...I will need to spend sometime so I understand what they are doing. But that does seem more efficent then my multiple "if" statements.

    Thanks for your input. I appreciate it.

    Best Regards,
    Bill12780

Similar Threads

  1. < We need hints and tips area of forum >
    By electroken in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th December 2009, 16:34
  2. Any tips for 4-layer boards?
    By Byte_Butcher in forum Off Topic
    Replies: 30
    Last Post: - 13th December 2009, 16:56
  3. 3 Volts Design Tips and Tricks
    By sougata in forum Documentation
    Replies: 1
    Last Post: - 5th October 2009, 18:51
  4. IDE with emulation!
    By T.Jackson in forum PBP Wish List
    Replies: 22
    Last Post: - 26th February 2008, 20:39

Members who have read this thread : 0

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