Menu

using timers as counters

Help
fisyon
2016-10-19
2016-10-19
  • fisyon

    fisyon - 2016-10-19

    hello,

    i am playing with 16f628a @20mhz and trying to use timers(0 or 1) as asynchronus counter.
    i mean, is it possible to count a signal independent of the system clock.
    i am not sure if that is possible or how to do.

    if possible:
    can you give me an example for that?
    if not:
    why there is a source selection?

    another thing:
    if i understand correctly Timer0 of AVR has 1:1 prescaler but Pics are 1:2 at lowest, right?

    i have another question about LCDBacklight constant(?).
    what is it for?, why not just define a pin and set it on/off?

    btw, i am using the latest GCB version

     
  • kent_twt4

    kent_twt4 - 2016-10-19

    This topic was recently talked about in terms of a frequency meter using a 12f683 and TMR0 via the external input T0CKI pin. https://sourceforge.net/p/gcbasic/discussion/579126/thread/8b1aa325/

    That should get you going. Also, can use the comparator to condition the input signal if required.

     
  • fisyon

    fisyon - 2016-10-19

    i saw that topic.
    i am trying to copy and implement your code w/out understanding.
    however, it is 02:30 am right now, i need a fresh mind
    thank you again

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.