Switch on/off every sine pulse


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    I read up a bit on DT's wonderful instant interrupts. How cool is that!? I had heard of it here often but now I see just how powerful that thing is!

    I understand that an interrupt can be generated from the comparator using "CMP_INT -- Comparator Interrupt" from his include.

    So, conceptually, it is simply comparing to zero volts. Whenever that changes (not zero anymore,) then interrupt. Am I on the right path here?

    OR maybe simply using the port change interrupt will work? Hmm, it needs to see a certain voltage before it is considered "on" though, huh?

    Here is what I need it to do:
    As V rises above zero, generate an interrupt. Then I'll tell the PIC to turn on a pin.
    As V falls to zero, generate an (different?) interrupt. Then I'll tell the PIC to turn the above pin off and turn on a different one.

    I'm just confused about the rising/falling or comparing part of it.

    Anyone have a snippet related? (Is that kind of shameless asking allowed?)

    Thanks everyone.

    Chris

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Which PIC

    Quote Originally Posted by ChrisHelvey View Post
    I read up a bit on DT's wonderful instant interrupts. How cool is that!? I had heard of it here often but now I see just how powerful that thing is!
    Chris
    The Coolest (greatest) possible extension to PBP Two different version for the x14 and x16 architecture. Very Pro very powerful......Free. DT has done a lot, lot hard work for us.
    Quote Originally Posted by ChrisHelvey View Post
    I understand that an interrupt can be generated from the comparator using "CMP_INT -- Comparator Interrupt" from his include.
    The comparator generates an interrupt whenever there is a state change.
    Quote Originally Posted by ChrisHelvey View Post
    Anyone have a snippet related? (Is that kind of shameless asking allowed?)
    I intended to give you one. That is why asked for the PIC you would be using.
    Regards

    Sougata

  3. #3
    Join Date
    Jul 2006
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Ah, very good.

    I will be working on an 18f4550. I have one here and it should offer what I need.

    Thanks SO much in advance.

    Chris

Similar Threads

  1. Pulse Capture and byte building
    By boroko in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st July 2009, 01:59
  2. 'Soft' On/Off Power Switch
    By Art in forum General
    Replies: 19
    Last Post: - 14th November 2008, 01:54
  3. Replies: 3
    Last Post: - 13th September 2008, 17:40
  4. How to read pulse from reed switch
    By passion1 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th June 2007, 14:29
  5. Switch PIC16F877 ON/OFF
    By koossa in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th August 2005, 12:34

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