How instant are Instant Interupts?


Closed Thread
Results 1 to 29 of 29

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    555? Eeewwwww!
    I think the minimum monostable time is around 2uS.

    Actually, for the 0 delay, I was thinking you could do it with some 74HC NAND gates. A little tricky though.

    By creating a SET/RESET flip-flop that gets toggled immediately on the incoming pulse, it can "gate" the FOSC/4 out signal into Timer1.

    With a CCP module in COMPARE mode, you can load the delay time in CCPRxL:H prior to the pulses, and when it sees a match, it will output a pulse on the CCP pin which will reset the flip-flop, turning off the final pulse with great precision, and no software delay.

    Interrupts will probably still be needed to reset things for the next pulse, but the actual task is done by hardware.
    <br>
    DT

  2. #2
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    No I'd never use a 555 timer but I though about something along the same lines. In the past, the way way past, I had a project that used some really high stability and acurate timing IC's. I think the part number began with Z.
    Anyway, I do agree that hardware is the way to go for the 0 and 1uS delay.

    I've never used a PIC timer or a ccp so this should be good for learning.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jmgelba View Post
    ... I've never used a PIC timer or a ccp ...
    Then you won't want to do this.
    But here's what I was thinking in post#4 ...

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3287&stc=1&d=123847625 4" /><!-- Name:  ZeroDelay.JPG
Views: 1399
Size:  23.5 KB -->

    This would be for Zero delay only, just to show the concept.
    But it only takes a couple changes to get full control (zero delay or interrupt timed, selectable).

    Some PIC's have a Gated Timer1 built into the chip. That would make the OSC config easier, and it wouldn't need the lower NAND gate.

    Zero Delay or Full Control, it still only takes one 74HC00, and the mode is selected by the PIC.

    Purely theoretical.
    <br>
    DT

  4. #4
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    Interesting. I had been looking at programmable and custom delay lines too. There are a couple out there that are mcu controllable but cost a fortune. 74HC00's do not!

    And, DT, I gotta try my hand at this for a couple of reasons.

    1. I'd like to pay next months mortgage.
    2. I'd stop asking you about timers and ccp's.

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


    Did you find this post helpful? Yes | No

    Default

    1. I'd like to pay next months mortgage.
    I thought everyone quit paying those things.

    2. I'd stop asking you about timers and ccp's.
    Now I'm confused, cause this would definitely generate more Timer/CCP questions.

    Or did you mean you'd try your hand at programmable and custom delay lines?
    <br>
    DT

  6. #6
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    Still barely paying my mortgage.

    If I figured out timers and ccp's, I would be one person less asking you questions (in the future.)

    As for now, yep, there'd be several questions I'm sure!

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


    Did you find this post helpful? Yes | No

    Default

    OK, then let me throw some fuel on the fire...

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3293&stc=1&d=123853748 1" /><!-- Name:  ZeroDelay2.GIF
Views: 1797
Size:  12.7 KB -->

    This is the "Full control" version.
    I've connected the pulse input to the INT pin of the PIC, for the delayed pulses.

    The second input of the first NAND goes to another PIC pin (Zero Delay Enable).
    When that pin is HIGH, Zero Delay is selected and the output of the flip-flop will go high immediately on an incoming pulse.
    R1 keeps it disabled till the PIC takes over.

    Another pin is used to "Set from CPU".
    This is used to Set the output Flip-Flop manually from the PIC so it can respond to Delayed pulses timed by the interrupts. Taking the pin LOW will set the flip-flop. This should be tri-stated when in Zero Delay mode.

    Clearing the flip-flop (end of pulse width) is done with the CCP out pin. Whether it's actually the CCP doing it, or timed interrupts.

    Again, Purely theoretical.
    <br>
    DT

Similar Threads

  1. DT's instant interupts compile problem
    By comwarrior in forum General
    Replies: 4
    Last Post: - 18th October 2009, 20:30
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 15:46
  3. Instant interupts
    By Sneaky-geek in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2009, 20:18
  4. DT Instant Interrupt counting
    By jderson in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 9th March 2008, 23:47
  5. Instant Interupts with a 12f675
    By wlundonly in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 26th January 2008, 02:52

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