參數(shù)資料
型號: HCTL-2032-SC
元件分類: 通用總線功能
英文描述: Quadrature Decoder/Counter Interface ICs
中文描述: 正交解碼器/計數(shù)器接口芯片
文件頁數(shù): 18/20頁
文件大小: 302K
代理商: HCTL-2032-SC
18
Figure 18. Typical Program for Reading HCTL-2032 with Atmel AVR
Set Portb.4 'EN1=1
Reset Portb.5 'EN2=0
Reset Portb.6 'Select X-axis
Result_new = 0
Result_old_x = 0
Result_old_y = 0
Do
Set Portb.0 'Disable OE
Waitms 25
Reset Portb.1 'SEL1=0 (MSB)
Set Portb.3 'SEL2=1 (MSB)
Reset Portb.0 'Enable OE
Gosub Get_hi 'Get MSB
Set Portb.1 'SEL1=1 (2nd Byte)
Set Portb.3 'SEL2=1 (2nd Byte)
Gosub Get_2nd 'Get 2nd Byte
Reset Portb.1 'SEL1=0 (3rd Byte)
Reset Portb.3 'SEL2=0 (3rd Byte)
Gosub Get_3rd 'Get 3rd Byte
Set Portb.1 'SEL1=1 (LSB)
Reset Portb.3 'SEL2=0 (LSB)
Gosub Get_lo 'Get LSB
Set Portb.0 'Disable OE
Waitms 25
Mult = 1
Temp = Result_lo * Mult 'Assign LSB
Result = Temp
Mult = Mult * 256
Temp = Result_3rd * Mult 'Assign 3rd Byte
Result = Result + Temp
Mult = Mult * 256
Temp = Result_2nd * Mult 'Assign 2nd Byte
Result = Result + Temp
Mult = Mult * 256
Temp = Result_hi * Mult 'Assign MSB
Result = Result + Temp
'
'Result = 32-bits Count Data
'
.
.
Loop
Get_hi:
Hi_old = Pina 'Get Current Data
Hi_new = Pina 'Get 2nd Data
If Hi_new = Hi_old Then
Result_hi = Hi_new 'Get Stable Data
Return
Else
Goto Get_hi
End If
相關(guān)PDF資料
PDF描述
HCTS00D Radiation Hardened Quad 2-Input NAND Gate
HCTS00HMSR Radiation Hardened Quad 2-Input NAND Gate
HCTS00DMSR Radiation Hardened Quad 2-Input NAND Gate
HCTS00K Radiation Hardened Quad 2-Input NAND Gate
HCTS00KMSR Radiation Hardened Quad 2-Input NAND Gate
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
HCTL-2032-SCT 制造商:Avago Technologies 功能描述:QUADRATURE DECODER/ COUNTER INTRFC IC 32PIN - Tape and Reel
HCT-L-R5A 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Optoelectronic
HCT-L-R5B 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Optoelectronic
HCT-L-R-HA 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Optoelectronic
HCT-L-R-HB 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Optoelectronic