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.

integration of values from ADC with the Trapezoidal method

Status
Not open for further replies.

gauchosuizo

Junior Member level 3
Joined
Jul 14, 2004
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Argentina
Activity points
233
hi

I'm working with CCS and Pic 18f252. I want to implement in the Pic the trapezoidal rule to do a integrator from 0 to 60 sec. Can help me anybody? Has anybody any code example?

Thanks

Pablo
 

Say there are n samples within 0 to 60 sec. The formula:

RESULT of Integration = ((tn - t0)/2*n)*(y0 + y1 + y2 +... + yn)

... where t0 is the time instant at first sample (i.e. y0), tn is the time instant at n-th sample.

I assume CCS is a C compiler. So, in my opinion, it should not be difficult to implement the equation above. :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top