Button command explanations


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Location
    France
    Posts
    97

    Default Button command explanations

    Hello,
    I didn't find any explanations about BUTTON command, so :
    in the help I see
    BUTTON Pin,Down,Delay,Rate,BVar,Action,Label
    question:
    Tell me if I can use this Command for this need.
    Assume that somebody depress a DTMF unit, so I am aware of a code is
    present looking to the STROBE input of a MT8870 for example.

    I need to DO a ONE step (right or left depending of the DTMF code)
    and if the guy is maintaining the DTMF strobe... let say after 500 ms
    I will continue to send Right or left order(s) to the Servo motor.
    and as soon the button is released, I will return to the main routine
    waiting for a new DTMF.

    Is the button command can help me ?

    if fact i do not really understand the meanning of autorepeat and the Action
    label interraction.

    Thanks in advance for your good support.
    Francois

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink P'tet ben qu'oui, p'tet ben qu'non ...

    Hi, François

    The BUTTON function can be used to look at the StD pin ( 15 or 17 ) ...

    BUT, to work properly, this pin must be regularly scanned to see if a tone couple has been detected ... ( same use as IF pin x = 1 THEN ...but "anti rebond" included )

    OR use an interrupt if the program must react quickly.

    What about TSM , rue des 15 arpents ( or so ...) ???

    Hé,hé !!!

    Alain
    Last edited by Acetronics2; - 26th October 2006 at 13:37.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Futura science invaders

    Well button may help or not, as Alain said. But i would personnally choose an interrupt routine or a tight loop with some PAUSEUS to do the job. I'm not a fan of this Button command so far...

    Any snip of what you tried?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Sony SIRC IR Issue
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th August 2015, 08:10
  2. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  3. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 22:43
  4. Button Push within 3 second Window
    By Tissy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd December 2005, 10:06
  5. Button subfunction 16F628
    By Jųan in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th August 2005, 16:44

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