Instant Interrupts - Revisited


Closed Thread
Results 1 to 40 of 773

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    The difference is that on the 4520, there is only 1 interrupt source for the Comparator module. A change in either comparator will cause an interrupt to the same handler.

    There are other chips that have individual interrupt flags for each comparator, but not the 4520.

    So you need to use the CMP_INT, on that chip.
    <br>
    DT

  2. #2
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel,

    Thanks for reply, I had slowly worked my way towrds that.

    for th 18F45K20 Migration
    The comparator is no longer controlled by the
    CMCON register and each comparator now has it’s
    own control register, CM1CON and CM2CON. The
    functionality of the bits has also changed.

    there is a section that confirms the observations made about the registers, so it really does always boil down to RTFD, but reading is sometimes not enough if you suffer from word blindness, anyway it gave me the opportunity to say thankyou for your routines which I intend to use.

    Duncan.

    Furthermore if everybody read and fully "understood" the datasheets this forum would die.

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


    Did you find this post helpful? Yes | No

    Default

    ... thankyou for your routines which I intend to use ...
    Grrreat! Hope the rest works out OK.
    If not, let me know.

    Furthermore if everybody read and fully "understood" the datasheets this forum would die.
    Or, then we could actually talk about the real purpose of this forum.
    Programming with PicBasic Pro.
    <br>
    DT

  4. #4
    Join Date
    Feb 2007
    Posts
    37


    Did you find this post helpful? Yes | No

    Default POT & RCTIME works with DT_INTS-14.bas?

    Hi Darrel,

    this is my first post on this comunity. First of all I would thanks for the fantastic DT_INTS-14.bas background PWM routine.

    I have uset your SW on a 16F628 in order to drive some LED with different brightness an WORK PEFECTLY. Darrel YOU ARE GREAT!!!!!

    Now I need to use a potentiometer so set at run time the brightnes value for the LEDs, and after reading tons of html page and googled for hours, I have the founded suspect that the PBP instruction POT and RCTIME do not work with DT_INTS-14.bas.

    Can you please confirm?

    Ciao

    Leo

  5. #5
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Leo,
    Any time you have a routine or command that counts time, an interrupt will cause the timing to be off. Since the POT command times the discharge time of a cap, an interrupt in the middle of it will cause the command to give you a faulty reading when it is resumed.

    There are several options;
    --turn off the interrupts just before your POT command (and any other timing-specific command), and restore them just after.
    --write yourself a home-made "pot" command, and use it inside the interrupts (but this only works if your interrupts are high frequency.)
    --use a "real" a/d converter, either one in the PIC or off the chip.

  6. #6
    Join Date
    Feb 2007
    Posts
    37


    Did you find this post helpful? Yes | No

    Default POT & RCTIME works with DT_INTS-14.bas?

    Many thanks tenaja for your prompt reply.
    Ciao
    Leo

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Wirecut View Post
    Many thanks tenaja for your prompt reply.
    My sentiments, exactly.
    <br>
    DT

Similar Threads

  1. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 22:43
  2. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 21:02
  3. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 21:48
  4. Keypad and DT's Instant Interrupts
    By Homerclese in forum General
    Replies: 11
    Last Post: - 27th April 2007, 07:32
  5. Replies: 1
    Last Post: - 1st November 2006, 04:11

Members who have read this thread : 6

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

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