查看完整版本: 关于HCTL2032的问题

jessie_adm 2010-3-26 13:59

关于HCTL2032的问题

[size=2][/size][font=Verdana][size=10pt]by [b][color=green]ningliang1111[/color][/b]
[/size][/font][font=新細明體][size=10pt]您好,由於需要我買了一片[/size][/font][font=Verdana][size=10pt] HCTL-2032 [/size][/font][font=新細明體][size=10pt]的[/size][/font][font=Verdana][size=10pt] IC[/size][/font][font=新細明體][size=10pt],但是調試了好長的時間都沒有調試好。[/size][/font]
[font=新細明體][size=10pt]我是與[/size][/font][font=Verdana][size=10pt] DSP2812 [/size][/font][font=新細明體][size=10pt]相連的,用來擴展一路[/size][/font][font=Verdana][size=10pt] QEP [/size][/font][font=新細明體][size=10pt]電路,八根數據線是合[/size][/font][font=Verdana][size=10pt] DSP [/size][/font][font=新細明體][size=10pt]的數據線相連的,控制線用[/size][/font][font=Verdana][size=10pt] DSP [/size][/font][font=新細明體][size=10pt]的通用[/size][/font][font=Verdana][size=10pt] IO [/size][/font][font=新細明體][size=10pt]口來控制,[/size][/font][font=Verdana][size=10pt]HCTL2032 [/size][/font][font=新細明體][size=10pt]的輸入晶振手冊上說是[/size][/font][font=Verdana][size=10pt] 33M[/size][/font][font=新細明體][size=10pt],我用的是[/size][/font][font=Verdana][size=10pt] DSP [/size][/font][font=新細明體][size=10pt]的晶振輸出,輸出為[/size][/font][font=Verdana][size=10pt] 33.33M[/size][/font][font=新細明體][size=10pt],但是[/size][/font][font=Verdana][size=10pt] DSP [/size][/font][font=新細明體][size=10pt]也是可以輸出為[/size][/font][font=Verdana][size=10pt] 30M[/size][/font][font=新細明體][size=10pt]的,這個我可以修改[/size][/font][font=Verdana][size=10pt] DSP [/size][/font][font=新細明體][size=10pt]的參數來得到。[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=新細明體][size=10pt]我讀取數據的程序如下:[/size][/font][font=Verdana][size=10pt]
    SEL1 = 0; // Select MSB
    SEL2 = 1;
    OE = 0; // Enable OE
    DATA_3 = *ptrMSB; // Fetch the MSB
    SEL1 = 1; // Select 2rd byte
    SEL2 = 1;
    DATA_2 = *ptr2nd; // Fetch the 2rd byte
    SEL1 = 0; // Select 3rd byte
    SEL2 = 0;
    DATA_1 = *ptr3nd; // Fetch the 3rd byte
    SEL1 = 1; // Select LSB
    SEL2 = 0;
    DATA_0 = *ptrLSB; // Fetch the LSB
    OE = 1; // Dis-able OE[/size][/font]
[font=新細明體][size=10pt]我也用示波器測試了[/size][/font][font=Verdana][size=10pt] HCTL2032 [/size][/font][font=新細明體][size=10pt]的輸入管腳的信號,都是正確的輸入信號,但是所有的輸出管腳都沒有信號輸出,數據端口更沒有波形輸出,我開始用的[/size][/font][font=Verdana][size=10pt] DSP [/size][/font][font=新細明體][size=10pt]的輸出晶振是[/size][/font][font=Verdana][size=10pt] 33.33[/size][/font][font=新細明體][size=10pt],後來改成[/size][/font][font=Verdana][size=10pt] 30M[/size][/font][font=新細明體][size=10pt],也試了好多[/size][/font][font=Verdana][size=10pt]30M[/size][/font][font=新細明體][size=10pt]以下的频率,但是均没有数据输出,我[/size][/font]
[font=新細明體][size=10pt]输入的[/size][/font][font=Verdana][size=10pt]QEP[/size][/font][font=新細明體][size=10pt]信号频率为[/size][/font][font=Verdana][size=10pt]1HZ[/size][/font][font=新細明體][size=10pt]的正交编码脉冲。[/size][/font]
[font=新細明體][size=10pt]调试了几天,都没有结果,我都怀疑芯片是不是好的了[/size][/font]
[font=新細明體][size=10pt]麻烦版主提点意见。。[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]I connect the HCTL2032 with the DSP2812,the follow imageshow this
  THE code:[/size][/font]
[font=Verdana][size=10pt]    N1 =1;
    EN2 = 0;
    RSTX = 1;[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]    clk=30Mhz
    void fetch_32(void)
   {   
    /*Fetch 32-bit Data */
    SEL1 = 0; // Select MSB
    SEL2 = 1;
    OE = 0; // Enable OE
    DATA_3 = *ptrMSB; // Fetch the MSB
    SEL1 = 1; // Select 2rd byte
    SEL2 = 1;
    DATA_2 = *ptr2nd; // Fetch the 2rd byte
    SEL1 = 0; // Select 3rd byte
    SEL2 = 0;
    DATA_1 = *ptr3nd; // Fetch the 3rd byte
    SEL1 = 1; // Select LSB
    SEL2 = 0;
    DATA_0 = *ptrLSB; // Fetch the LSB
    OE = 1; // Dis-able OE
}[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]The problem is the DATA port don't output wave ,andI use the osillograph to  measure the input port ,the wave areall  normal ,but the input singal to the HCTL2032 is only 2.5V,Idon't know this is normal or not.
  Because of it have no signal outputed,I have no idea to do  thenext.[/size][/font][font=Verdana][size=10pt]

[/size][/font]
[font=Verdana][size=10pt]by [b][color=red]Sam Lin
[/color][/b][/size][/font][font=Verdana][size=10pt]I have somesuggestion as below.
1. Please see the HCTL2032’stiming diagrams.
2. You can try another HCTL2032.

[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]by [b][color=green]ningliang1111
[/color][/b][/size][/font][font=Verdana][size=10pt]TodayI debug the HCTL-2032, the DATA port can output wave but the result is notcorrect. I give the ports CHAx and CHBx  QEP signals with a frequency 2HZ,but I read the data with DSP2812, the data almost increase with 100 per second,and it first counter up ,then counter down,and counter up ....counter down.........[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]for example: 11572->11628->11542->11645->11597->11612...[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]I couldn't find out  the reason.[/size][/font]


[font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]by [b][color=red]Sam Lin[/color][/b]
[/size][/font][font=Verdana][size=10pt]Could you tell me that Pin 8 and Pin 9 have to connect“High” or “Low” or “floating”? [/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]
by [b][color=green]ningliang1111[/color][/b]
[/size][/font][font=Verdana][size=10pt]an:  Pin 8 (U/Dx) and Pin 9 (U/Dy)  is "floating "  on my PCB[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]
by [b][color=red]Sam Lin[/color][/b]
[/size][/font][font=Verdana][size=10pt]As far as I know,   Pin 8 (U/Dx) and Pin 9 (U/Dy)  are not "floating ".
The datasheet should be to have detailed statement.
U/Dx = UP or DOWN.[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]
by [b][color=green]ningliang1111[/color][/b] [/size][/font]
[font=Verdana][size=10pt]  On the datasheet the pin 8&9 description likethis:[/size][/font]
[font=Verdana][size=10pt]"This LSTTL-compatible output allowsthe user to determine whether the IC is counting up or down and is intended tobe used with the CNTDEC and CNTCAS outputs. The proper signal U (high level) orD/ (low level) will be present before the rising edge of the CNTDEC and CNTCASoutputs."[/size][/font][font=Verdana][size=10pt][/size][/font]

[font=Verdana][size=10pt] I think the pins is just outputpins ,on  the datasheet  we know that it just output a plus totell us the counter is up or down .[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]Also , at the last page of the datasheet,from the image of the example ,the HCTL2032 also only connect some pins,the pin 8 don'n show on that image.[/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]      As you said,if the pin 8&9 have  to connect somethings ,it wanntconnect what? Because i don't have somethings to  refer.  and onthe web ,the data about HCTL2032 is very little. I feel very puzzled![/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]     And today ,I have to orderanother piece of HCTL2032, and i will wait few days ,I hope the new chip canmake sense[/size][/font][font=新細明體][size=10pt]!![/size][/font][font=Verdana][size=10pt][/size][/font]
[font=Verdana][size=10pt]     If you have more suggest or gooddata ,please tell or sent it to me!
   [/size][/font]
[font=Verdana][size=10pt]  Thanks yo give me the  datasheets, But all the data I had see them on your company 's homepage.[/size][/font]
[font=Verdana][size=10pt]     I think I must to think moreabout it.[/size][/font]
[font=Verdana][size=10pt]     Thank you for your help [/size][/font][font=新細明體][size=10pt]!![/size][/font]



[font=Verdana][size=10pt]< from Morrihan Avago [/size][/font][font=新細明體][size=10pt]產品討論區舊版[/size][/font][font=Verdana][size=10pt] 2009/6/22 >[/size][/font]




[font=Verdana][size=10pt][/size][/font]

jessie 2011-11-9 17:09

測試hctl2032問題

[quote]原帖由 [i]jessie_adm[/i] 於 2010-3-26 13:59 發表 [url=http://www.morrihan.com/newbb/redirect.php?goto=findpost&pid=6007&ptid=4520][img]http://www.morrihan.com/newbb/images/common/back.gif[/img][/url]
by ningliang1111
您好,由於需要我買了一片 HCTL-2032 的 IC,但是調試了好長的時間都沒有調試好。
我是與 DSP2812 相連的,用來擴展一路 QEP 電路,八根數據線是合 DSP 的數據線相連的,控制線用 DSP 的通用 IO ... [/quote]

by [color=teal]tsaimfe & chuangcchi[/color]                                 
前幾個禮拜有跟你們(台中公司)購買了一些Avago的HCTL-2032來做測試,目前已經可以成功讀到D0~D7的訊號,在馬達正轉時會遞增,反轉時會遞減,但當Counter值減到0時,再繼續反轉時,其所讀到的值卻只有65535, (在我們的理解應該是變成2的32次方?)也就是只有16bit的感覺, 由於我們目前所測試的軸向其移動距離並不會超過此數值,但在日後其它軸向使用時便會用到.因此仍必須處理這問題.

而在HCTL2032的Datasheet上有看到它有8, 16, 24, or 32-Bit等四個Operating Modes ,但卻沒有看到如何選擇或設定Operating Modes,所以這部份不知道是否是因為Operating Modes預設為16bit而造成.
所以不知道可否請您提供一下意見有可能是什麼原因造成上面的問題呢?
感謝!


by [b]Sam[/b]
1. 0~65535 : 2的16次方
2. pin6與pin26怎麼接? 還是說您可以把pin6與pin26調整一下? 您有調整過這兩隻pin的high or low嗎?
    En1:high, En2:Low On 4X是沒問題.
  
您可以截取您現在2032的基本電路給我看一下嗎?


by [color=teal]chuangcchi  [/color]  
   我目前在測試上EN1是high,而EN2是給low,亦即是x4的count mode
至於您提到的pin6與pin26,我查datasheet應該是決定讀取byte的腳位設定,目前我們是用DSP的程式時序去決定讀取腳位的輸出變化,但是結果似乎只有16bit的輸出結果,讀取MSB以及3rd byte數值均為0,我也有check EN1與EN2的腳位關係,確定是x4 mode,還煩請您替我們解答,謝謝!

  不好意思,剛剛經過您的提醒,我去check電路的時候發現,我將SEL2的腳位與OE/的腳位接反了,
因此導致結果不如預期,將腳位更正後,數值已經正確,可輸出32bit的資料,如有造成您的不便之處,
還望您多多包涵,非常感謝!

< from Morrihan 2010/2/8 >
頁: [1]
查看完整版本: 关于HCTL2032的问题
LTC3864 凌力爾特 60V 輸入降壓 DC/DC 控制器 於電池供電系統僅耗 40μA
凌力爾特 LTC2990 數位監視器可精準量測內部及遠端溫度
凌力爾特 LT8300 可簡化設計 : ThinSOT 高壓、微功率隔離式完整返馳穩壓器