The PIC24FJ microcontroller family feature lots of modules to perform many common operations with hardware. The problem with is is the microcontroller needs a big enough pinout for all of them.
Because this is not possible, the PIC23FJ feature remappable pins (RP) which can be assigned to different modules. How to use this function is no secret, and perfectly explained in the user reference manual. Yet I wanted to share the tiny library I have put together to handle them. The library does only cover a few modules, but can easily be modified to cover them all.