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??
 

neoaspilet11

Full Member level 5
Joined
Sep 29, 2005
Messages
277
Helped
29
Reputation
56
Reaction score
8
Trophy points
1,298
Location
Cebu, Philippines
Activity points
4,048
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.
 

Thiliniv

Junior Member level 3
Joined
Nov 20, 2009
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,458
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.
 

vijay s

Full Member level 3
Joined
Jun 14, 2008
Messages
159
Helped
27
Reputation
54
Reaction score
9
Trophy points
1,298
Location
Coimbatore, India
Activity points
2,152
@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
 

Anuradha1

Member level 2
Joined
Nov 11, 2009
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
India
Activity points
1,570
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

Top