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

    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

  2. #2
    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!

  3. #3
    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: 1617
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

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    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" /><!-- Attachment 3293 -->

    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>
    Hmm, how would one use this for falling edge trigger? I'll be honest, I havent had time to study what you are doing here, but what I've looked at seems logical.
    I just ordered a couple of quad nands and a few 40MHz resonators, and over the next week or so will have a chance to work with this.

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


    Did you find this post helpful? Yes | No

    Default

    Hmm, how would one use this for falling edge trigger?
    Several possibilities there.

    If using Option #1, the 4th NAND gate is available and can be used to invert the incoming signal. Selection of Normal/Inverted modes would then be with a Jumper or SPDT switch.

    If you wanted it to be selectable by the PIC, you could add a 74HC86 quad XOR. With the extra gates, you could put an XOR on the output too if you wanted the option to invert it from the PIC.
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Default Keeping the thought alive

    Here's an update for the last post.
    Two 74HC86 XOR gates have been added to be able to invert the input and output polarities.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3300&stc=1&d=123889536 2" /><!-- Name:  ZeroDelay3.GIF
Views: 1132
Size:  14.1 KB -->

    I see that you specified "Trigger input is TTL 5V rising or falling edge, selectable." in the first post.
    I must have missed that part.

    I could be diverging from what you want to do.
    But the problem is intriguing, so I'm continuing onward ... thru the Fog.

    I think the circuit above gives you all the capabilities you're looking for.

    I did a quick pseudo-program to see what it would take for a simple test without interrupts, and it was surprisingly easy.

    If you can settle on a PIC to use ... preferably 2-CCP's (1 for the FOSC4).
    Could probably come up with something that's close.

    I love shooting things ... with camera's.
    DT

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


    Did you find this post helpful? Yes | No

    Default

    Looks like 18F4220 at the moment. I only have v2.43 so I am limited in which devices I can use. I cant find my reciepts or proof of purchase anywhere to get the upgrade.

    I need a decent amount of I/O's. 2x8 lcd, at least 4 or 5 switches, status led's, logic gates, fet drive, lcd back light, adc for capacitor charge level/status.

    I'm not a coder or really much of a hardware guy, but I am a power supply and LED guy. If only I could show you some of the stuff going on here.....

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