Answer the question
In order to leave comments, you need to log in
InputCapture on PIC24FJ256DA210 what kind of beast?
Hello dear forum users! I would like to use the InputeCapture module for my project of counting the frequency of the input signal. The idea is this: I apply a high-frequency signal to one input, the pulses of which are counted by a 32-bit timer (because the number there will turn out to be not small), and to the other I apply a standard frequency and for every 4-16 pulses at this input I capture readings from the timer 32 bit and compare with the standard. And since I have a PIC24FJ256DA210 in stock, I want to use it. The problem is that I have never worked with PICs (only AVR), and after reading the datasheet on google translate, I did not quite understand how to configure this module.
Namely:
1) The datasheet says about three modes of operation of the module, is the Cascaded mode for a 32-bit timer suitable for me, or am I wrong? I did not understand the description of the SYNCHRONOUS AND TRIGGER MODES modes
2) The module is controlled by the ICxCON1, ICxCON2 registers did not understand the exact purpose of the SYNCSEL, ICTSEL bits?
3) The datasheet says "When the capture module is enabled, the user must ensure that the I/O pin direction is configured for an input by setting the associated TRIS bit. The pin direction is not set when the capture
module is enabled." What I literally translate is that when the module is turned on, the pin must be configured to the input TrIS = 1, which particular pin is responsible for the capture module ???
4) After capturing data from the timer, is it reset by hardware, or does it need to be done programmatically?
Sorry for such a big question, but there is not so much information on peaks compared to ABP, at least in Russian, I wonder why no one has made any video course on YouTube yet!?! There is one but it is in assembler ...
So I ask for advice from knowledgeable people who can help with anything.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question