IOC on the 27k40


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: IOC on the 27k40

    yes your correct, in that i could have turned off the IOC port trigger in neg or Pos , which ever was set , but the main toggling the IOC enable wont work as prev k22,k80 where it will stop the IOC being registered on k40 ,

    as i am porting code from k80,k22 where the enable / disable of IOC is in many places in code , so having to ensure the IOCxF is cleared where i am disable/ enable, this stops a not required jump to the ISR to clear it , requires a bit of work

    its just another step to do on the k40, as there is no main clear of the all IOCxF registers that i can see so far except by manual clearing,
    nor a way to ensure a globle enable / disable that ensure that IOCxF wont register a change , after being setup in the IOCxN, IOCxP triggers

    only a globle IOC status if triggered in in PIR0.4 as you pointed out in

    that said with the flag set on the which IOC was triggered in each port, and if it was negative or positive , you can have a nice branch system for each IOC or group of IOC, possible in the ISR where it was not so great in the k22, k80 IOC system

    sheldon

  2. #2
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: IOC on the 27k40

    You can clear most flags from anywhere by:

    IOCAF = 0
    PIR1.5 = 0
    ...etc

    Flags for UART require reading the RC1REG to clear the flag, but they are in the exception category.

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. Unorthodox use of IOC Port.B
    By mtripoli in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 2nd April 2013, 22:06
  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. IOC question
    By Adrian in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st April 2008, 20:21

Members who have read this thread : 1

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