DT Instant Interrupts help


Results 1 to 8 of 8

Threaded View

  1. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Hi. I would recommend for the sake of experimantation to increase the sampling of the count command to say 2000msec and see what happens.

    The timer1 interrupts the count every 105 msec and is obvious that there is interference since the Count also samples at 100 msec. Remember that the Interrupts are not Instant with the exact meaning. There is an overhead to save and restore the variables and program counter.

    Also at your program:

    Code:
    :main
    make it as
    Code:
    main:
    and
    Code:
        while 1=1
         COUNT rpmIn, 100, rpm 
         LCDOUT $FE,1, "PULS/S ", DEC(RPM)
         LCDOUT $FE, $C0, "RPM ", DEC(rpm)*60
        wend
    make it as:
    Code:
    rpm var word
    LCDOUT $FE,1, "PULS/S ", $FE,$C0,"RPM:"
        while 1=1
         COUNT rpmIn, 2000, rpm:rpm=rpm*60 
         LCDOUT $FE, $80,dec,"  ", rpm,$FE,$C5, DEC rpm,"   "
        wend
    this is much faster.

    Ioannis
    Last edited by Ioannis; - 26th November 2008 at 14:57.

Similar Threads

  1. DT Instant Interrupts
    By krohtech in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 25th February 2009, 16:33
  2. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 21:02
  3. 12F683 and DT Instant Interrupts
    By jderson in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 22nd November 2008, 13:47
  4. 18F1220 and DT Instant Interrupts
    By jderson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th June 2008, 06:37
  5. Replies: 1
    Last Post: - 1st November 2006, 04:11

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