Finding time to read a timer ??


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838

    Cool Finding time to read a timer ??

    Hi guys ,

    can you advise a ways to read a timer who's' interrupt flag will likely appear while its doing other things before it can find time to read it to check it

    code is using 8bit timer 2 , with a preload of 250, = 250*16pre*15post *5uS=300mS ( 5us clock when 8Mhz)

    i start the timer
    then going to do a routine that takes about 1 sec to complete and then check the flag , but since timer is only 300ms , its missed it , so way out

    only way i know is to somehow go check the flag after time frame of less than 300ms , but the routines it calls are not always as predictable to the 300ms time frame to check and will be likely missed

    any suggestions or code ref on how to approach this problem

    cheers

    Sheldon

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


    Did you find this post helpful? Yes | No

    Default Re: Finding time to read a timer ??

    DT instant interupts . Search the forum and you will find tons of example code for this.

  3. #3
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Finding time to read a timer ??

    ok thanks for tht ill go look

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