Counting led blinks..


Closed Thread
Results 1 to 40 of 93

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Re: Counting led blinks..

    Interupt on change or even better a real INT pin. Then you can count all pulses without too much work. A good start is as always DT's instant interupts that makes it fast, fun and flexible.

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


    Did you find this post helpful? Yes | No

    Default Re: Counting led blinks..

    Why any real INT should be less work than any dedicated counter? No advanatage at all.

    Q: Sir We need to know when something chagend, a button press
    A: Load the counter to 255, on the next press it will generate an overflow interrupt
    Steve

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

  3. #3
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Re: Counting led blinks..

    Why? Since he already used PORTB.1 in his code an interrupt solution requires no HW change.

    And it was just a example to show an other possibility....

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