Close

MPLab X + Interrupts + Timers (decoding NEC)

A project log for Tiny PCB weighing 2.5 grams w/ a few features

2 channel constant current programmable output, IR communications, weight < 3 grams

sophi-kravitzSophi Kravitz 04/26/2020 at 17:420 Comments

Today's goal is to measure the time between external interrupts.

External INT on a PIC16LF1708 is on RA2. Use the internal weak pull-up.

It's not that easy to find where to set, so I'll put it here. Use MCC's Pin Module to enable the register. In order to set individual pull-ups (rather than a whole port at once), the WPUEN bit must be enabled.

Then:

Discussions