SOLVED - Can't get IOC on pin change working


Results 1 to 9 of 9

Threaded View

  1. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Can't get IOC on pin change working

    I removed INTCON and PIE0 as per:
    https://www.picbasic.co.uk/forum/sho...517#post154517

    The HeartbeatLED doesn't hang any more, but the ISR doesn't seem to get triggered.

    Richard gives me hope; the 16F18875 is part of the same family as the 16F18877:
    https://www.picbasic.co.uk/forum/sho...529#post154529

    You need to redo the section that #defines the interrupt bit locations.
    It's in the section that looks like this...
    Code:
      #define INT_INT      	PIR0,INTF,  PIE0,INTE       ;-- External INT
      #define IOC_INT      	PIR0,IOCIF, PIE0,IOCIE     ;-- Int On Change       *
    You need to get the datasheet for the part and change the 'PIR0,INTF, PIE0,INTE' statements to match.
    I have no idea what section of the datasheet I'm supposed to be looking at.
    https://www.picbasic.co.uk/forum/sho...497#post154497

    EDIT: Found this from MpgMike (got some reading to do):
    https://support.melabs.com/forum/pic...tant-interrupt
    Last edited by Demon; - 29th August 2024 at 07:35.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. IOC on a ACD pin ?
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th August 2013, 02:11
  2. Replies: 1
    Last Post: - 12th May 2012, 13:37
  3. A Simple IOC Routine (Interrupt On Change)
    By lugo.p in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th March 2010, 20:53
  4. Interrupt-on-Change-pin!
    By PICante in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 11th February 2009, 21:22
  5. HELP !!! How change the voltage of a pin ????
    By stormdacta in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 21st August 2007, 21:55

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