An366 – Cirrus Logic AN366 User Manual
Page 41
Advertising

AN366
AN366REV2
41
STOP CONVERSIONS
(See Figure 37.)
SDI = 0x90
0x15 0xFFFFFF
Read PF1
(page 16, register 21)
SDO = 0xFF
0xFF 0x410F40
(0.508278)
SDI = 0x90
0x19 0xFFFFFF
Read PF2
(page 16, register 25)
SDO = 0xFF
0xFF 0x4106A8
(0.5080157)
For 1 to Count {
PF1SUM = PF1SUM + PF1
PF2SUM = PF2SUM + PF2}
Figure 37. Conversion Window
PF1AVG = PF1SUM ÷ Count
PF2AVG = PF1SUM ÷ Count
PHASE1_OFFSET = ARCCOS(0.5083238) - 60º = -0.55224327
PHASE2_OFFSET = ARCCOS(0.5085984) - 60º = -0.57051489
Use this constant stored from PC/Controller memory in following calculations.
READ PF
2
1
CALCULATE
PHASE
OFFSET =
arccos(PF)-60º
RESOLUTION
MULTIPLIER
0.008789 (50Hz)
0.010547 @ 60Hz
STOP
CONVERSIONS
0xD8
Shown
In
Main
Flow
Advertising