My code for ADC button handling, it works, but can it be slimmed down?


Closed Thread
Results 1 to 28 of 28

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: My code for ADC button handling, it works, but can it be slimmed down?

    Why not use the genuine BUTTON command ?????????????????

    of course, needs some "brainwork" and practise - and of course at least " read that f...... manual " ... "

    but the result is worth the effort ...

    " Just my two cents " ...

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

  2. #2
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: My code for ADC button handling, it works, but can it be slimmed down?

    Read 1st post 1st

    This is ADC input.

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


    Did you find this post helpful? Yes | No

    Default Re: My code for ADC button handling, it works, but can it be slimmed down?

    Quote Originally Posted by CuriousOne View Post
    Read 1st post 1st

    This is ADC input.
    ADC for ONLY two buttons and " immediate response " ( sic ) ??? ...

    if it's your choice ... go on ! ( ) ...

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,643


    Did you find this post helpful? Yes | No

    Default Re: My code for ADC button handling, it works, but can it be slimmed down?

    adc key reading is a good tried and tested technique and can be very responsive, the question here is can it be done
    using less memory. the answer is yes of course, if done in a methodical way.
    c1 has opted not to discuss or elaborate on his implementation in any meaningful way. end of story
    Warning I'm not a teacher

  5. #5
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: My code for ADC button handling, it works, but can it be slimmed down?

    This is just an example for 2 buttons
    for 20 buttons there should be 40 variables
    I wanted to avoid that
    this is why I asked

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: My code for ADC button handling, it works, but can it be slimmed down?

    With 10 or 20 keys, how do you handle the event of more than one key being pressed at the same time?

  7. #7
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: My code for ADC button handling, it works, but can it be slimmed down?

    By clever selection of ADC resistors.
    This had been solved long time ago, and not by me

Similar Threads

  1. Long / short press button...but reading ADC
    By fratello in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 10th July 2016, 08:37
  2. Replies: 42
    Last Post: - 18th March 2012, 23:02
  3. How come my DS18S20 code still works?
    By Wilson in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 30th July 2011, 02:59
  4. 12 bit or higher ADC on a PIC that works with PBP?
    By Brandon in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 11th November 2007, 17:19
  5. ADC -how it works?, pic -
    By matias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th March 2007, 21:54

Members who have read this thread : 1

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