loading
64Comments

Tell us about yourself!

Complete Your Profile
  • KennyL15 commented on amandaghassaei's instructable Arduino Timer Interrupts5 months ago
    Arduino Timer Interrupts

    "so a counter will take 10/16,000,000 seconds to reach a value of 9 (counters are 0 indexed)"Do you actually mean takes 10/16000000 seconds to begin (initial state) at 0 and then get back to a 0 count again? That is, initial index of 0. Then first increment is 1, second increment is 2, third increment is 3, all the way to 9th increment to index 9, and then one extra increment to get back to index 0 again. Altogether 10 increments to 'get back to 0'.

    Should also mention that the clock prescaler bit names CSX0, CSX1, CSX2 has the first number as 'X'. That number 'X' is linked to the timer number. So if 'X' is 0, then CS00, CS01, CS02 are prescaler bit names for timer 0; and the second value represents the bit position. So C00 means bit 0 (right-most-bit) of the 8-bit register TCCR0B, which is for timer 0.The reason why I'm indicating this is because the tables (diagram) that go with "prescalers and compare match register" is confusing - since there's no mention about what CS10, CS11, CS12 etc are actually related to.

    "so a counter will take 10/16,000,000 seconds to reach a value of 9 (counters are 0 indexed)"Do you actually mean it takes 10/16000000 seconds to begin (initial state) from index 0 and get back to a 0 index again? That is, initial index of 0. Then first increment is 1, second increment is 2, third increment is 3, all the way to 9th increment to index 9, and then one extra increment to get back to index 0 again. Altogether 10 increments to 'get back to 0'.

    "so a counter will take 10/16,000,000 seconds to reach a value of 9 (counters are 0 indexed)"Do you actually mean it takes 10/16000000 seconds to begin (initial state) from index 0 and get back to a 0 index again? That is, initial index of 0. Then first increment is 1, second increment is 2, third increment is 3, all the way to 9th increment to index 9, and then one extra increment to get back to index 0 again. Altogether 10 increments to 'get back to 0'.

    View Instructable »