View Single Post
  #81   Spotlight this post!  
Unread 07-05-2010, 00:26
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Unexpected results from Encoder::GetRate()

Quote:
Originally Posted by vamfun View Post
Also, could you describe the 4x algorithm equations (like your description of the 1x and 2x earlier).
Notation:
A => value of A channel currently
A' => value of A channel last sample
A + B => A XOR B
A | B => A OR B
A & B => A AND B
!A => NOT A

Equations:
Count = (A + A') | (B + B')
Count_Dir = A + B' + !Reverse
Count_Up = Count & Count_Dir
Count_Down = Count & !Count_Dir

(Reverse is a configuration register)

-Joe
Reply With Quote