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.

[moved] 32bit input capture using PIC16f

Status
Not open for further replies.

kiransbaddi

Member level 2
Joined
Nov 30, 2015
Messages
51
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
427
Hello

I m working on project which operates on IR remote control. I have tested the output of IR remote through TSOP using Arduino it is giving 32bit Word.
Problem:

How i can Capture 32bit data from pic16f18856. In this microcontroller cature register is of only 16bit wide.
 

Re: 32bit input capture using PIC16f

By using timer interrupt and counting overflows of capture register.
 

Re: 32bit input capture using PIC16f

Probably simpler is to make a 32-bit shift register from four 8-bit registers. The PICs have useful RLF/RRF instructions that make it easy to chain registers in only two instructions. All you need to do is clock the data, either by using fixed timing or by looking for the pulse edges.

Brian.
 

Re: 32bit input capture using PIC16f

Capture mode makes use of the 16-bit Timer1 resource. When an event occurs on the capture source, the 16-bit CCPRxH:CCPRxL register pair captures and stores the 16-bit value of the TMR1H:TMR1L register pair, respectively.
To capture time intervals exceeding 16-bit timer range, count timer interrupts. Or use a processor with 32-bit timers respectively 16-bit timer cascading feature.
 

hello,

the frequency of data bit on IR remote control is slow enough , to direct store result inside a long word (32 bit)
or in a table of 32 element ( even using a byte to store one bit )
 

Hi,

Maybe you misunderstand the capture functionality.

The result of a capture is a timestamp of a signal edge.
Each signal edge may cause a timestamp... it depends on the capture function setup.

A capture result will never directly give the value of a serial dataword.

Klaus
 

Kiransbaddi, it would help if you told us whether you are trying to read the data bits so you can see how they are encoded or whether you are trying to use the PIC capture mode to measure how long each bit lasts for.

I think there is confusion because of the wording of your question, 'input capture' has a specific meaning on PIC devices because they have the ability to measure how long a signal is present at their input pins using a timer. If you are trying to read the sequence of 1 and 0 bits in an IR command, a software shift register is what you need.

Brian.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top