Shop OBEX P1 Docs P2 Docs Learn Events
feedback requested: Sigma Delta Tutorial for public review — Parallax Forums

feedback requested: Sigma Delta Tutorial for public review

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2011-04-06 14:15 in Propeller 1
Linked is a complementary document to the ADC tutorial I posted a couple weeks ago.

I'd love feedback, comments, etc -- It's targeted an introductory level again.

http://dl.dropbox.com/u/7557533/temp/Sigma%20Delta%20for%20Public%20Review.pdf

Thanks in advance

OBC

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2011-04-06 14:11
    OBC,

    I've never used the SigmaDelta object, but your example doesn't look right. Your code is
      repeat
        adc.SigmaDelta(@sample)
        pst.dec(sample)
        pst.newline
    
    The SigmaDelta method consists of a single line that starts a PASM routine. The PASM routine updates a long in hub RAM based on the pointer that is passed through the SigmaDelta call. Your code starts a new cog each time it loops. It seems like SigmaDelta should be called once before entering the loop. If you want every sample the loop should contain a waitcnt that matches the one in the PASM code. Of course, that would be a bit fast to print out to a serial port.

    Dave
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-04-06 14:15
    @Dave,

    I've intentionally omitted the waitcnt for simplicity's sake, however I see what you mean by the routine launching a new cog each pass. I'll adjust it accordingly. Thanks

    Edit: Document updated

    OBC
Sign In or Register to comment.