digital integrator algo for bipolar sigs?


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi pwhitt,

    Although it was written for the Basic Stamp, you may find this usefull.

    http://www.parallax.com/dl/docs/books/edu/ic.pdf

    Look at experiment #6<br><br>
    DT

  2. #2
    pwhitt's Avatar
    pwhitt Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel,

    This is actually a slower approach than what I am doing. It is more nicely coded - but the branching would greatly reduce the speed. I'm trying to run a loop that will iterate at over 100kHz, and I am not concerned with regular periodicity, ie if it runs a few times at 125kHz and a few periods are at 110kHz all is well.

    i have proportional control running at 800kHz. However when i add the integral calculation, check for saturation and sum the result, it's at nearly 50kHz. I've managed to get the calculations as clean as possible, but the IF/THENs are killing me.

    I was really hoping a CE out there would have a suggestion as to how to deal with this. For instance, the first condition in my current loop checks to see if the result is between 00 and FF, then writes it, then immediately returns to the sample. It only checks for saturation if that condition fails, resulting in an aperiodic signal, but it is only slow when the output is saturated - so I'm not worried about that.

    Even if it requires raw assembly I'll be happy to implement it. I'm also trying to come up with a very long routine that would branch only once or twice while continusously resampling and writing when not saturated.

Similar Threads

  1. Digital Out on an A/D pin safe ?
    By mr.sneezy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st January 2009, 23:48
  2. PIC 18f4680 DIGITAL INPUTS
    By MegaADY in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th July 2008, 08:34
  3. I2C Comm with Digital Compass HMC6352
    By jihlein in forum Serial
    Replies: 10
    Last Post: - 9th April 2008, 23:25
  4. Replies: 4
    Last Post: - 24th January 2007, 23:20
  5. Digital IC Tester
    By precision in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th September 2006, 04:38

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts