Problem with DT Inst Interrupt + NAP


+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54

    Default Problem with DT Inst Interrupt + NAP

    I MADE A CONTROLLER TO SETUP A PLL OF THE MY RECEIVER AIR BAND THAT IS WORKING WELL. HOWEVER, I NEEDED USING THE COMMAND NAP TO REDUCE THE NOISE THAT PIC GENERATE AT RADIO CIRCUIT. I WAS USING TON INTERRUPT TO DETECT A KEYBOARD 4X4 THAT USING TO INSERT THE DESIRED FREQUENCY.
    USING THE COMMAND NAP I GOTTA REDUCE THE PIC PROCESSING NOISE LEVELS THE ACCEPTABLE. SO I DECIDED TO USE PATTERNS DT INSTANT INTERRUPT TO IMPLEMENT A TIMER USING THE ELAPSED TIMER. BUT THE TIMER DOESN'T WORDED, AND I NEEDED REMOVING THE NAP COMMANDS TO MAKE THE TIMER WORK, BUT THEN THE PIC NOISE RETURNED ON AUDIO OF THE RADIO.
    SOMEONE KNOW SAY WHAT AM I DOING WRONG?
    FROM WHAT I UNDERSTAND, THE ELAPSED INTERRUPTION NOT TO WORK WITH COMMAND NAP.
    ANY HELP IS COMING BEEM!

    THANK YOU

    PIMENTEL

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,219

    Default Re: Problem with DT Inst Interrupt + NAP

    Hi,

    * When the NAP command executes the PIC is put to SLEEP.
    * When the PIC is put to SLEEP the main oscillator stops.
    * If you're clocking the timer from the main oscillator then the timer won't increment during the NAP period since the oscillator is stopped.

    As I think (hope) you can see by now it has nothing to do with DT-Ints but with the way the PIC works, plain and simple.

    By the way, WHY ARE YOU SHOUTING AT US?

    /Henrik,

  3. #3
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54

    Default Re: Problem with DT Inst Interrupt + NAP

    I thank the explanation. I'm not yelling friend, just written with capital letters because it was using the translator, because I am still learning English. Looks like I will not be able to use the Elapsed routine along with the NAP command. It's a shame because without the NAP pic generates noise in the receiver circuit. Would you have any idea to help me with this?

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,249

    Default Re: Problem with DT Inst Interrupt + NAP

    Pas de problème.

    Can you:
    - have an external clock IC,
    - save the time on memory,
    - put PIC to sleep,
    - wake up the PIC every once in a while using a 555 timer,
    - check the time elapsed since sleep?

    I'm sure there are simpler ways.

    Robert

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,219

    Default Re: Problem with DT Inst Interrupt + NAP

    I'm not sure if ElapsedTimer supports it but the way to do it, I'd think, is to use the TMR1 oscillator and drive it with an external 32.768kHz clock crystal. That oscillator doesn't stop when the PIC is put to sleep.

    /Henrik.

Similar Threads

  1. Error using DT's Inst Interrupts and PIC BASIC PRO Long
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 6th December 2014, 18:11
  2. NAP vs. SLEEP
    By AvionicsMaster1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th August 2011, 19:47
  3. Nap and sleep commands
    By rusty99 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 27th August 2010, 08:16
  4. DT inst. interrupt & Timer0 with pic 16F88
    By aratti in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th December 2009, 21:23
  5. Sleep & nap
    By keymuu in forum mel PIC BASIC Pro
    Replies: 24
    Last Post: - 4th December 2008, 18:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts