Shop OBEX P1 Docs P2 Docs Learn Events
P2 Audio Out - Page 2 — Parallax Forums

P2 Audio Out

2»

Comments

  • @"Dave Hein"
    yes, the counter wraps back to zero. I did not consider this case. Thanks for the solution.
    It sounds much better with the decay.

    @rogloh
    I don't have the AV board, I use a self-made headphone amplifier and there is currently only one channel soldered.
    But you've already described the extension to stereo.
  • cgraceycgracey Posts: 14,155
    Use the CMPM WC instruction to get the MSB of the CT vs target compare into C.
  • grep 'CMPM' *.csv
    23,.,Math and Logic,EEEE 0010101 CZI DDDDDDDDD SSSSSSSSS,"CMPM    D,{#}S   {WC/WZ/WCZ}","Compare D to S, get MSB of difference into C.                    C = MSB of (D - S).                 Z = (D == S).",,2,same,2,same,,,
    
    
    Yes, I'll try it.
    Very useful instruction.
Sign In or Register to comment.