Reading keypad problem


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    2

    Default Reading keypad problem

    I am new to PicbasicPro programing and i need some help reading keypad connected to a 16f876 uC. I have managed to display the keys pressed on a standard 16x2 LCD display, but now i don`t know how to store the whole string of numbers entered in a variable, so it could represent a number of rotations for a stepper motor. For example if i enter 5 5 5 it should somehow be stored in a variable "rotations" as 555. I saw a similar question asked before on this forum, but was left unanswered.
    I know it seems like a trivial question, but it`s frustrating me.
    Thanx in advance.

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hello PostAR,

    Do a search for "Keypad Entry?" by Tonigalea dated 7Aug04. Look at the response to his post by Ms. Melanie. I think this will handle your situation.

    BobK.

  3. #3
    Join Date
    Feb 2007
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Hi Bob.

    Of course!

    if x = 5 then
    bigword= NUM[1]*1000 + (NUM[2]*100) +(NUM[3]*10)+(NUM[4]*1)

    This will make a number from my digits. Piece of cake! But i guess it`s allways easy once they show you how Thanx again.

Similar Threads

  1. Problem reading 93c46 EEprom
    By dj.lambert in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th March 2009, 06:10
  2. problem with my code
    By civicgundam in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd February 2008, 01:52
  3. Keypad Problem
    By koossa in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th October 2005, 13:06
  4. Writing / Reading EEPROM 24LC256 Problem
    By schmoddel in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th February 2004, 18:55
  5. 3x4 keypad scanning problem and others
    By pt3rg in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd December 2003, 02:21

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