Picoverter Code Question


Author Message
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 2260
Posted: 12:38am 29 Jul 2026      

FYI:

201 Sine array | 200 Sine array
THD 0.5%       | THD 0.9%

 0 0              0 0
 1 1029           1 1034
 2 2058           2 2068
 .                .
 .                .
 99 65526         99 65532  \ another pair
100 65535        100 65532  /  
101 65526        101 65516  
 .                .
 .                .
198 2058         198 1034
199 1029         199 0     <-- Last value used before index resets
                               to 0 for the next 1/2 Sine sequence

Last 5 values used from the arrays above as Index wraps to 0.

Index   Ary 201   Ary 200
-------------------------------
198     2058      1034
199     1029      0    -------> 0 Extra zero-cross timing.  
  0        0      0    <------- Zero crossing
  1     1029      1034
  2     2058      2068
 

Edited 2026-07-31 09:34 by KeepIS