![Infineon Technologies TC1796 Скачать руководство пользователя страница 1781](http://html1.mh-extra.com/html/infineon-technologies/tc1796/tc1796_user-manual_20554371781.webp)
TC1796
Peripheral Units (Vol. 2 of 2)
General Purpose Timer Array (GPTA)
User’s Manual
24-126
V2.0, 2007-07
GPTA, V2.0
Check_Input()
if (DCMk.Signal_Input.Transition) then
if (DCMk.Signal_Input.Level) then //rising edge
trig(DCMk.Service_Request_Rising)
if (DCMk.Capture_On_Rising_Edge) then
DCMk.Capture_Value = DCMk.Timer
else
if (DCMk.Capcom_Opposite) then
DCMk.Capcom_Value = DCMk.Timer
endif
endif
if (DCMk.Clear_On_Rising_Edge) then
DCMk.Timer = 0
else DCMk.Timer ++
endif
if (DCMk.Clock_On_Rising_Edge) then
Generate pulse on DCMk.Signal_Output
endif
else //falling edge
trig(DCMk.Service_Request_Falling)
if (!DCMk.Capture_On_Rising_Edge) then
DCMk.Capture_Value = DCMk.Timer
else
if (DCMk.Capcom_Opposite) then
DCMk.Capcom_Value = DCMk.Timer
endif
endif
if (DCMk.Clear_On_Falling_Edge) then
DCMk.Timer = 0
else DCMk.Timer ++
endif
if (DCMk.Clock_On_Falling_Edge) then
Generate pulse on DCMk.Signal_Output
endif
endif
else DCMk.Timer ++
endif