ME Labs, Inc.
I haven't tried the updated DT-INTs, but the issue could be related to the fact that on the K40 all of the PIR, PIE, and IPR registers aren't located in the access bank anymore... they're in bank 14 so they'd need banksel instructions to access them.TMR1_INT works but RX2_INT doesn't. The processor jump somewhere else
I don't recall seeing this on other chips.
Here's a stab at an updated version of mpgmike's DT-INT for the K40. I added the IPEN fix, changed register accesses to use banksel, and cleaned up the whole K40 device selection code.
It compiles, but I don't have a K40 to test it on...
I am struggling to make Pickit 3 work with the IPE environment and program the K40 thing...
I 'll try your fix as soon as I am able to use the Pickit.
Unfortunately I have also another programmer but is obsolete now (Pikprog+ by Elnec) and does not support new chips. Classic, buy our new shiny programmer...!
Remove any target connections and hit 'Connect'
If you get a 'Connection failed' message keep hitting 'Connect' until it downloads all three sections.
For me it takes 4 tries...
Finally you should end up with:
Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.
Things should work normally after this.