Pic32MX Clock too slow
since the pic32mx340F512H runs at 80 MHz clock rate max., that means you only have four instruction cycles for the CPU to interrupt program flow, jump to the interrupt handler, execute it, and jump back into program flow. That simply won't work. Not even mentioning the fact that I wonder what you'd do with all the four cycles you have in each interrupt if there was no overhead and interrupt latency.

Your application should definitely not be interrupt driven, but simply be a loop that does something useful in 3 CPU cycles, and jumps back to the beginning in 1. I'm not sure if the PIC32 core has a single-cycle jump instruction at all – making this even more unlikely to work, even under perfect, zero-overhead cases