Please add support for PIC16F616 as that is a cheap device I often find myself using for small projects.
I made an attempt at adding it (and PIC16F610) myself and I got far enough that I could use it for the project I'm currently working on). Attached is my partial patch with the hopes that someone else can finish it or that it can be integrated with the limitations it has and be better than nothing. I mostly copied how PIC16F676 is implemented and left TODOs for the things I know are missing (mainly the Comparators and the Enhanced CCP). My current project only uses GPIOs and the ADC so I haven't verified other functions (e.g the timers). The patch is made against version 0.31.0.
Anonymous
I needed this for another project which used different features of the chip so I made some updates to make it work too. Attached is version 2 of my patch which is now slightly more complete
The changes are: adding the Enhanced CCP, correcting the writable bits for ANSEL and PIR1, fix initialization of PR2, and removing the non-existing OSCCAL which caused the frequency to always be set 12.5% too low. I tried adding OSCTUNE but it expects OSCCON to be present which it isn't on this device.
I also fixed CCPCON::is_pwm() which returned true for all CCP modes except 0 and 2 instead of just 12, 13, 14, and 15 as this caused CCPR1H to be overwritten every timer TMR2 reset even though the CCP was in compare mode.
Last edit: Anders Sonmark 2022-08-22
Change added to svn 2597. Initial patch formed bases of addition. Thanks for your effort.