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.

how to use the pic16f877 to detect pwm output sensor to pic

Status
Not open for further replies.

de_student2003

Newbie level 2
Joined
Jan 9, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,312
pic pwm sensor

can anyone tell me how to use the counter of pic16f877 to detect pwm output sensor (accelerometer) to pic input??
 

pic sensör pwm

Hi,
I think there are a number of solutions to your problem. One solution is outlined below. And I think using PICF877 is too much to use for this application You can use Pic16F84A instead.

Solution 1.) Connect you PWM output to RB0 Interrupt pin. As soon as an interrupt occurs during rising edge of the PWM, Reset TMR0 or load proper TMR0 count, and change Interrupt edge definition from rising edge to falling edge. At falling edge of the PWM, get the TMR0 count then multiply to its TMR0 period, you get your PWM pulse width. the problem with this scheme is when TMR0 overflows before falling edge. So you need proper prescaling of the TMR0 so that the overflow period is longer than the PWM width.
 

Re: how to use the pic16f877 to detect pwm output sensor to

Does you have any idea about how the PWM output will look like? Because I want to give an PWM input to PIC16F877 in Proteus (ISIS) . So how can i give such an input.
 

@thiliniv
PWM is nothing but an pulses(square Wave) with Width of Pulses modulated with information...
if u like to Measure the width of pulses read content of above post ..

use wikipedia to read more on PWM
 

Re: how to use the pic16f877 to detect pwm output sensor to

Hello de_student2003,

Did you manage to find the answer for your question?
We are also in need of knowing how to detect PWM output of a acclerometer using a pic16F877.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top