• AVR Freaks

Hot!Help about Counter ASM file

Author
NEX_CT
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2021/03/03 03:39:48
  • Location: 0
  • Status: offline
2021/03/04 06:15:21 (permalink)
0

Help about Counter ASM file

Hello everyone
I downloaded this ASM file from the network, it works fine, but it send serial data every 1/4 sec. I would like to decrease this time to 1/8 sec. Can someone help me by indicating which modification, if it possible.
 
Regards in advance 
 
NEX
 
#1

2 Replies Related Threads

    Jim Nickerson
    User 452
    • Total Posts : 6932
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: Help about Counter ASM file 2021/03/04 10:28:26 (permalink)
    +2 (2)
    Homework ?  Smile: Smile
    #2
    EdwardPage
    New Member
    • Total Posts : 25
    • Reward points : 0
    • Joined: 2021/02/07 20:06:48
    • Location: 0
    • Status: offline
    Re: Help about Counter ASM file 2021/03/04 22:19:55 (permalink)
    0
    Passed by this post and found the example interesting to read through, although I agree it does sound homeworky.
     
    Without giving the answer away I would take a look under "Constants and Timings".
    Also take a look at the subprogram "count_pulses:"
    Take note of the variables;
    gatecnt_lo
    gatecnt_hi
    GATE_TIME_LOOPS
     
    The author has given lots of information, comments and hints to how this program works. 
     
    Note that they have gone to the effort of recording how many instruction cycles are used per loop, those number of loops determine the count time of measuring the pulses, being 1, 0.5 or 0.25 seconds. Don't forget if you count the number of pulses for a shorter period then you must also make changes to the calculations that display the frequency.
     
     
    #3
    Jump to:
    © 2021 APG vNext Commercial Version 4.5