I am using EasyPIC v7a and mikroC Pro for PIC 8 bit MCUs.
As you know, there is no mikrobus board definitions for lower pin count PIC. So I made a mpkg file containing mikrobus board definitions for 28 or 20 pins PIC.
I altered the default generic gpio file and did the following replacements. I tested these board definitions on simulation only. So it may contain errors. Please correct them and upload here again.
As the pin counts decrease, you may not use both mikrobus sockets at the same time. Please check carefully when you replace pins by another.mikroBUS Board Definitions for 28, 20 Pins DIP PIC MCUs.
For 28 Pins MCUs,
E0 to B4
E1 to B5
E2 to B6
ANSELE to ANSELB
For 20 Pins MCUs, in addition to the above mentioned replacement, set
B0 to B7
B1 to B7
A3 to A0
For my replacement scheme, you cannot use B0 and B1 at the same time on 20 pins PIC.