|
HCTL-2032 Datasheet, PDF (20/21 Pages) Agilent(Hewlett-Packard) – Quadrature Decoder/Counter Interface ICs | |||
|
◁ |
Get_hi:
Hi_old = Pina
Hi_new = Pina
If Hi_new = Hi_old Then
Result_hi = Hi_new
Return
Else
Goto Get_2nd
End If
Get_2nd:
2nd_old = Pina
2nd_new = Pina
If 2nd_new = 2nd_old Then
Result_2nd = 2nd_new
Return
Else
Goto Get_2nd
End If
Get_3rd:
3rd_old = Pina
3rd_new = Pina
If 3rd_new = 3rd_old Then
Result_3rd = 3rd_new
Return
Else
Goto Get_3rd
End If
Get_lo:
Lo_old = Pina
Lo_new = Pina
If Lo_new = Lo_old Then
Result_lo = Lo_new
Return
Else
Goto Get_lo
End If
âGet current data
âGet 2nd Data
âGet stable data
âGet current data
âGet 2nd Data
âGet stable data
âGet current data
âGet 2nd Data
âGet stable data
âGet current data
âGet 2nd Data
âGet stable data
Figure 18 Cont. Typical Program for Reading HCTL-2032 with Atmel AVR
20
|
▷ |