TMR1 interrupt question


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi ronjodu,

    I'm glad you figured it out.

    The way I like to put it is ...

    The only problem with Interrupts, is that they Interrupt things.

    And, any statement that does it's timing in software (SerIn/Out, OWin/out, Debug, Freqout, Pulsin/out, etc) will have that timing disturbed by the interrupts. Synchronous commands like LCDOUT, I2C and ShifIn/Out don't care.

    Had you been using a paralel interface to the LCD, it wouldn't have a problem.

    However, As you've found out with Serout, 1 easy way is to just turn off GIE before those types of statements. But that can cause you to lose interrupts. I'm sure at some point you'll be doing more than just blinking lights, and the problem will become more evident.

    If you use the USART on the 16F876 with HSEROUT, then you won't need to turn off the interrupts while sending serial data, and you won't lose any interrupts.

    HTH,
      Darrel

  2. #2
    Join Date
    Dec 2003
    Location
    Storrs, Ct.
    Posts
    91


    Did you find this post helpful? Yes | No

    Default Hserout

    I have tried the HSEROUT for the LCD and had trouble making it work. Serout2 was much easier to get working at the time. I guess I'll have to reinvestigate the HSEROUT option again.
    Is there an easy way for a beginner to tell which statements are affected by an interrupt and which are not. (trial and error perhaps?)

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    These PBP statements will be affected by the use of interrupts.
    DEBUG/IN
    DTMFOUT
    FREQOUT
    NAP
    OWIN/OUT
    PAUSE/US
    POT
    PULSIN/OUT
    PWM
    RCTIME
    SERIN/OUT
    SLEEP
    SOUND
    WRITE
    WRITECODE
    XIN/OUT
    I think I got them all. If anyone sees one I missed, please chime in.
    <br>
    DT

  4. #4
    Join Date
    Dec 2003
    Location
    Storrs, Ct.
    Posts
    91


    Did you find this post helpful? Yes | No

    Default Thanks again

    Thanks again, I've included a note in my manual on each statement.

Similar Threads

  1. Interrupt question
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th November 2009, 20:12
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  3. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  4. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07
  5. Interrupt question
    By stone in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th January 2005, 23: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