Micro-controller PIC16F88

Quote from desmondchan71 on May 5, 2025, 5:25 pmDear all,
PIC16F88 is the micro-controller to be taught in the UK WJEC A-Level Electronics. I have my students using SimulIDE, and use a PIC16F84 to simulate the action of a PIC16F88, but there are two limitations:
1. PIC16F84 does not have ADC function while PIC16F88 has. Students maybe using ADC in their project work.
2. PIC16F88 can be configured to use RA5 (i.e. MCLR turned off) but PIC16F84 cannot
I hope PIC16F88 w/ ADC function canĀ be added into future version of SimulIDE so that WJEC AL electronics students and teachers can be beneficial.
Thank you.
Dear all,
PIC16F88 is the micro-controller to be taught in the UK WJEC A-Level Electronics. I have my students using SimulIDE, and use a PIC16F84 to simulate the action of a PIC16F88, but there are two limitations:
1. PIC16F84 does not have ADC function while PIC16F88 has. Students maybe using ADC in their project work.
2. PIC16F88 can be configured to use RA5 (i.e. MCLR turned off) but PIC16F84 cannot
I hope PIC16F88 w/ ADC function canĀ be added into future version of SimulIDE so that WJEC AL electronics students and teachers can be beneficial.
Thank you.

Quote from arcachofo on May 6, 2025, 9:01 amHi.
Not sure, but probably PIC16F88 can be added without coding, just by creating some configuration files.
All depends in which peripherals it uses.
I see that ADC is the same as 16F876, maybe the other peripherals are similar to some PIC already implemented.
Package seems the same as 16F627, you can just copy and rename.
For other files you can copy (maybe from 16F84), rename and edit with correct values: RAM/PGM/ROM sizes, register names, addess, bits, interrupts, peripherals, etc.You need to add these files:
data/PIC/p16F88.mcu
data/PIC/p16F8x/p16F88_regs.xml
data/PIC/p16F8x/p16F88_int.xml
data/PIC/p16F8x/p16F88_perif.xml
data/PIC/p16F8x/p16F88.packageAnd add the new PIC to data/pics.xml
Hi.
Not sure, but probably PIC16F88 can be added without coding, just by creating some configuration files.
All depends in which peripherals it uses.
I see that ADC is the same as 16F876, maybe the other peripherals are similar to some PIC already implemented.
Package seems the same as 16F627, you can just copy and rename.
For other files you can copy (maybe from 16F84), rename and edit with correct values: RAM/PGM/ROM sizes, register names, addess, bits, interrupts, peripherals, etc.
You need to add these files:
data/PIC/p16F88.mcu
data/PIC/p16F8x/p16F88_regs.xml
data/PIC/p16F8x/p16F88_int.xml
data/PIC/p16F8x/p16F88_perif.xml
data/PIC/p16F8x/p16F88.package
And add the new PIC to data/pics.xml

Quote from desmondchan71 on May 8, 2025, 10:05 amQuote from arcachofo on May 6, 2025, 9:01 amHi.
Not sure, but probably PIC16F88 can be added without coding, just by creating some configuration files.
All depends in which peripherals it uses.
I see that ADC is the same as 16F876, maybe the other peripherals are similar to some PIC already implemented.
Package seems the same as 16F627, you can just copy and rename.
For other files you can copy (maybe from 16F84), rename and edit with correct values: RAM/PGM/ROM sizes, register names, addess, bits, interrupts, peripherals, etc.You need to add these files:
data/PIC/p16F88.mcu
data/PIC/p16F8x/p16F88_regs.xml
data/PIC/p16F8x/p16F88_int.xml
data/PIC/p16F8x/p16F88_perif.xml
data/PIC/p16F8x/p16F88.packageAnd add the new PIC to data/pics.xml
Following your suggestion, I added PIC16F88 and its ADC function seems to work properly, but I never tested other functions (e.g. comparator) as they are not required in AL electronic curriculum.
I still have some minor issue:
1. RA6, RA7 cannot work properly when I try to configure it as I/O ports instead of OSC.
2. I want to have RA5, RA6 and RA7 as I/O ports by default (I know RA5 can only be an input port).
Attach please find the files added. There may still be error in the config.
Please advice? Thank you.
Quote from arcachofo on May 6, 2025, 9:01 amHi.
Not sure, but probably PIC16F88 can be added without coding, just by creating some configuration files.
All depends in which peripherals it uses.
I see that ADC is the same as 16F876, maybe the other peripherals are similar to some PIC already implemented.
Package seems the same as 16F627, you can just copy and rename.
For other files you can copy (maybe from 16F84), rename and edit with correct values: RAM/PGM/ROM sizes, register names, addess, bits, interrupts, peripherals, etc.You need to add these files:
data/PIC/p16F88.mcu
data/PIC/p16F8x/p16F88_regs.xml
data/PIC/p16F8x/p16F88_int.xml
data/PIC/p16F8x/p16F88_perif.xml
data/PIC/p16F8x/p16F88.packageAnd add the new PIC to data/pics.xml
Following your suggestion, I added PIC16F88 and its ADC function seems to work properly, but I never tested other functions (e.g. comparator) as they are not required in AL electronic curriculum.
I still have some minor issue:
1. RA6, RA7 cannot work properly when I try to configure it as I/O ports instead of OSC.
2. I want to have RA5, RA6 and RA7 as I/O ports by default (I know RA5 can only be an input port).
Attach please find the files added. There may still be error in the config.
Please advice? Thank you.
Uploaded files:
Quote from arcachofo on May 8, 2025, 2:53 pmGreat, thanks for sharing.
I corrected a minor issue in package and configuration for Timers. (files attached)
Oscillator configuration and Config word seem to be different to any other PIC, so this must be implemented in code.
But by default I see RA6, RA7 as I/O Pins (activating intosc in p16F88_perif.xml)
Maybe fuses in your hex files are interfering ?Can you share some hex and circuit showing the problem with RA6,RA7?
Great, thanks for sharing.
I corrected a minor issue in package and configuration for Timers. (files attached)
Oscillator configuration and Config word seem to be different to any other PIC, so this must be implemented in code.
But by default I see RA6, RA7 as I/O Pins (activating intosc in p16F88_perif.xml)
Maybe fuses in your hex files are interfering ?
Can you share some hex and circuit showing the problem with RA6,RA7?
Uploaded files:
Quote from desmondchan71 on May 8, 2025, 7:10 pmHello,
Thank you for your prompt reply. I here attach a simple demo to show RA6 and RA7 not working properly. The ASM code bases on a template provided by WJEC Exam board and the HEX is compiled by Microchip MP LAB X v5.35 and mpasm v5.87 . Thank you.
Hello,
Thank you for your prompt reply. I here attach a simple demo to show RA6 and RA7 not working properly. The ASM code bases on a template provided by WJEC Exam board and the HEX is compiled by Microchip MP LAB X v5.35 and mpasm v5.87 . Thank you.
Uploaded files:

Quote from arcachofo on May 8, 2025, 10:35 pmThank you.
I found that there is one Config word that can work with this PIC.
Edit p16F88_perif.xml (the one from my last post) and change configword type to "01":<configwords name="cfgWord" type="01">
This is working for me.
But note that RA6,RA7 are configured as inputs in your asm code.
Thank you.
I found that there is one Config word that can work with this PIC.
Edit p16F88_perif.xml (the one from my last post) and change configword type to "01":
<configwords name="cfgWord" type="01">
This is working for me.
But note that RA6,RA7 are configured as inputs in your asm code.

Quote from desmondchan71 on May 9, 2025, 5:30 amHello,
Thank you for the advice. I've checked my ASM code and the setting for TRISA is b'00100000', I think it should be correct for RA6 and RA7 as output, and the code works fine when it is programmed on a physical one.
Hello,
Thank you for the advice. I've checked my ASM code and the setting for TRISA is b'00100000', I think it should be correct for RA6 and RA7 as output, and the code works fine when it is programmed on a physical one.

Quote from arcachofo on May 9, 2025, 5:43 amI see.
The problem is in p16F88_regs.xml at line 59, TRISA mask shoulkd be 11011111<register name="TRISA" addr="0x85" mask="11011111" reset="11111111"/>
I see.
The problem is in p16F88_regs.xml at line 59, TRISA mask shoulkd be 11011111
<register name="TRISA" addr="0x85" mask="11011111" reset="11111111"/>

Quote from desmondchan71 on May 9, 2025, 6:13 pmThank you very much. Now the PIC16F88 can fulfill the requirement of AL Electronics. Hope some other will continue to test it for other functions such as comparator and timer.
Thank you very much. Now the PIC16F88 can fulfill the requirement of AL Electronics. Hope some other will continue to test it for other functions such as comparator and timer.

Quote from desmondchan71 on May 15, 2025, 8:05 amI've added the read/write EEPROM function to PIC16F88. The config files are attached. Thank you.
I've added the read/write EEPROM function to PIC16F88. The config files are attached. Thank you.
Uploaded files: