Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using PIC12Fxxx(8pins) series microcontroller to detect wave/pulse as an input

Status
Not open for further replies.

hihi

Newbie level 4
Joined
Jul 28, 2005
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,316
hi all..i need to use PIC12Fxxx(8pins) series microcontroller to detect wave/pulse as an input .. using PIC18xxx series i know that using input capture to capture the input using CCP1 but as for the PIC12Fxxx i go through the datasheet i realise that there are no CCP1 register or any part saying about input capture. i would like to ask can PIC12Fxxx use input capture to capture waveform in ?
 

Re: Do helo...

Well, it's not so simple, but you can implement something with a PIC12F629 for example:

In the 12F629, timer 1 has a gate control input. That will act as your gate signal to allow the timer to increment only for the duration of the input pulse. But you have to poll this pin in SW to see when the pulse has finished and then read timer 1.
Or, you can sonect together the interrupt input and the gate signal and you get an interrupt when the gate signal changes state. Then you change the edge of the interrupt so next time you get an interrupt on the other edge and so on. Depending on which portion of the pulse you want to measure, you will need to read the timer and then reset it when the required edge is detected.

For period measurement, you simply detect the interrupt edge, read the timer, then clear it and then wait for the next interrupt, without changing the edge.

Of course, that means you lose two pins already and there is significant software overhead, but something can be done.

With a device like 12F509 for instance, which does not have interrupts, nor a gated timer, things would be very complicated and probably not worth considering.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top