hctl-2032-sct Avago Technologies, hctl-2032-sct Datasheet - Page 20

no-image

hctl-2032-sct

Manufacturer Part Number
hctl-2032-sct
Description
Quadrature Decoder/ Counter Interface Ics
Manufacturer
Avago Technologies
Datasheet
0
Get_hi:
Get_2nd:
Get_3rd:
Get_lo:
Figure 18 Cont. Typical Program for Reading HCTL-2032 with Atmel AVR
Hi_old = Pina
Hi_new = Pina
If Hi_new = Hi_old Then
Else
End If
2nd_old = Pina
2nd_new = Pina
If 2nd_new = 2nd_old Then
Else
End If
3rd_old = Pina
3rd_new = Pina
If 3rd_new = 3rd_old Then
Else
End If
Lo_old = Pina
Lo_new = Pina
If Lo_new = Lo_old Then
Else
End If
Result_hi = Hi_new
Return
Goto Get_2nd
Result_2nd = 2nd_new
Return
Goto Get_2nd
Result_3rd = 3rd_new
Return
Goto Get_3rd
Result_lo = Lo_new
Return
Goto Get_lo
‘Get current data
‘Get 2nd Data
‘Get stable data
‘Get current data
‘Get 2nd Data
‘Get current data
‘Get current data
‘Get 2nd Data
‘Get 2nd Data
‘Get stable data
‘Get stable data
‘Get stable data

Related parts for hctl-2032-sct