Shop OBEX P1 Docs P2 Docs Learn Events
Keypad — Parallax Forums

Keypad

Pat AlonziPat Alonzi Posts: 27
edited 2007-03-27 20:14 in BASIC Stamp
Hey Everyone,

I just bought some new parts and trying to get the keypad controller working.
This is the keypad controller I am using with a Basic Stamp 2: www.elabinc.com/ede1144.pdf

I was wondering if anyone knew how to use the data valid interrupt.

Thanks,
-Pat
pcalonzi@purdue.edu

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-27 16:10
    What do you want to use the data valid interrupt for?
  • Pat AlonziPat Alonzi Posts: 27
    edited 2007-03-27 16:15
    Sorry

    let me lay this out. I am kind of inventing the code in my head before i have it wired up but here is the plan:

    I am building a relay controller cabinet which will have different modes which run in loops I want to have the keypad to act as a user interface to start and stop the different loops:

    Something like this:


    Do
    x = random number
    on relay x
    pause
    off relay x
    pause
    loop
    or
    Do
    on relay 1
    pause
    off relay 1
    pause
    on relay 2...
    pause
    off relay 2...
    pause
    loop
    during any of these loops i want to ready the keypad to know if its time to stop the loop or adjust the pauses.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-03-27 16:18
    The data valid pin goes low when a valid key press has been detected, and 45 milliseconds later, the ede1144 transmits the valid data byte. The BASIC Stamp should be periodically watching that pin, and when it detects that the pin is low, it should go to its SERIN routine and get ready to receive the serial byte. 45 milliseconds is a long time in computer terms, but your PBASIC program has to keep checking that pin at least that often when it is expecting keyboard data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-03-27 20:14
    Pat,

    On several occasions I have posted code snippets for the EDE1144…I will attach what I have here today. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.