Search code examples
cpicmplab-x-5.50

PIC16 microcontroller_ no output even after following tutorial


I am using PICKIT 4, PIC16F18446 microcontroller, and MPLAB X IDE. I am following an instruction provided from Microchip, Measuring frequency

Update:

I am not entirely sure what i needs to change but I am consistently getting an output of Frequency: 25536 whether there is an input signal or not. (Image of the output, and pin configuration shown below)

enter image description here

enter image description here

enter image description here


Solution

  • The Original Poster is using a PIC18 tutorial for a PIC16F target.

    The MPLABX Code Configurator (MCC) tool is an awful thing for anyone new to the Microchip development tools to use.

    An MPLABX project that does what I think this tutorial is about for the PIC16F18446 target is here in my git hub repository.

    MCC was used to create most of this code so you should be able to see how it was done.

    This code runs in the MPLABX simulator but that is a buggy hot mess. Use it with caution.