Part 2
Next, Starting on Line 218 (of the original) are the same familiar Flags. *The same process is used here, where the appropriate name & Registers*are used for the MCU you are using. *For example, Lines 218 - 220 reads:
ifdef INT0IF *;----{ INT0 External Interrupt }----------[INTCON, INT0IF]---
* * * INT_Source *INTCON,INT0IF, INTCON,INT0IE, -1, -1
* endif
We would modify it to read:
ifdef INT0IF *;----{ INT0 External Interrupt }----------[PIR1, INT0IF]---
* * * INT_Source *PIR1,INT0IF, PIE1,INT0IE, IPR1,INT0IP
* endif
Another quick example, original:
* ifdef TMR1IF *;----{ TMR1 Overflow Interrupt }------------[PIR1, TMR1IF]---
* * * INT_Source *PIR1,TMR1IF, PIE1,TMR1IE, IPR1,TMR1IP
* endif
Modified for the K42:
* ifdef TMR1IF *;----{ TMR1 Overflow Interrupt }------------[PIR4, TMR1IF]---
* * * INT_Source *PIR4,TMR1IF, PIE4,TMR1IE, IPR4,TMR1IP
* endif
Hope this helps.




Bookmarks