• AVR Freaks

Hot!PIC18F27K42 CMP + SMT issue

Author
Roze Doyanawa
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2009/10/27 07:56:40
  • Location: 0
  • Status: offline
2020/06/05 13:41:55 (permalink)
0

PIC18F27K42 CMP + SMT issue

Hello,
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.
 
//Kind regards
 
 
 
#1

2 Replies Related Threads

    Roze Doyanawa
    New Member
    • Total Posts : 13
    • Reward points : 0
    • Joined: 2009/10/27 07:56:40
    • Location: 0
    • Status: offline
    Re: PIC18F27K42 CMP + SMT issue 2020/06/06 03:38:22 (permalink)
    0
    I've been doing a lot more testing. Seems the datasheet is wrong for the CMP. It does not take its reference from the FVR_buffer2 its the FVR_buffer1. And it seems the SMT stops itself if no data comes in a while.
     
    However, What is the limits of the SMT Module? Cant find them in the datasheet.
    Maximum frequency on signal pin for example.
    #2
    Roze Doyanawa
    New Member
    • Total Posts : 13
    • Reward points : 0
    • Joined: 2009/10/27 07:56:40
    • Location: 0
    • Status: offline
    Re: PIC18F27K42 CMP + SMT issue 2020/06/06 15:57:40 (permalink)
    +1 (1)
    Follow up, issue resolved, seems SMT does not like "no pulses" for too long or it shuts itself off.
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5