PIC18F27K42 CMP + SMT issue
I've been sitting and trying to get my PIC to read a LMT01 temperature sensor, however, because of how the signal is made up, I'm having serious issues with it.
Source signal is a 50ms window with 1 to 4096 pulses followed by a 50ms "silence". However the voltage level is roughly 1.2-1.5V, which is too low for a regular IO pin to count.
So my solution was to use the Comparator Module and trigger on + > 1.024V from the FVR module. This seems to be working, however, polling is too slow to pick up the 12µs second long pulses.
So, I thought I'd pipe the CMP1 Output into the SMT1 module's Counter mode and have it count, but I'm getting absolutely 0 counts on SMT1TMR, even tho polling counts at least 100 pulses have been registered.
I've attached the relevant init-code.
Any help appreciated.