Microchip has developed a library of low-level software routines and hardware peripherals that simplify meeting IEC 60730 requirements for Class B Safety. Each product family (PIC16, PIC18, PIC24, dsPIC DSC and PIC32) has functions specifically designed work efficiently with the available resources. Application Note AN1799 describes the Application Programming Interface (API) functions that are available in the Class B Safety Software Library and how to incorporate them in your project.
This version of the Class B library complies with Table H1 of IEC60730{ed3.2}.
See 01229B.pdf to get started using the libraries.