TC1796
Peripheral Units (Vol. 2 of 2)
General Purpose Timer Array (GPTA)
User’s Manual
24-121
V2.0, 2007-07
GPTA, V2.0
24.2.6.2 PDL-Algorithm
PDLx_Control_Logic() “to be performed every GPTA clock”
if (x == 0) then
S1.Level = FPC0.Signal_Output.Level
S1.Transition = FPC0.Signal_Output.Transition
S2.Level = FPC1.Signal_Output.Level
S2.Transition = FPC1.Signal_Output.Transition
S3.Level = FPC2.Signal_Output.Level
S3.Transition = FPC2.Signal_Output.Transition
else //x = 1
S1.Level = FPC3.Signal_Output.Level
S1.Transition = FPC3.Signal_Output.Transition
S2.Level = FPC4.Signal_Output.Level
S2.Transition = FPC4.Signal_Output.Transition
S3.Level = FPC5.Signal_Output.Level
S3.Transition = FPC5.Signal_Output.Transition
endif
if (PDLx.Three_Sensors_Enable) then
Three_Sensors()
else
Two_Sensors()
endif
if (PDLx.Mux) then
PDLx.Signal_Output1.Level = 1
if (PDLx.Signal_Forward or PDLx.Signal_Backward) then
PDLx.Signal_Output1.Transition = 1
else
PDLx.Signal_Output1.Transition = 0
endif
else
PDLx.Signal_Output1.Transition = S1.Transition
PDLx.Signal_Output1.Level = S1.Level
endif