發新話題
打印

关于HCTL2032的问题

关于HCTL2032的问题

by ningliang1111
您好,由於需要我買了一片 HCTL-2032 IC,但是調試了好長的時間都沒有調試好。
我是與 DSP2812 相連的,用來擴展一路 QEP 電路,八根數據線是合 DSP 的數據線相連的,控制線用 DSP 的通用 IO 口來控制,HCTL2032 的輸入晶振手冊上說是 33M,我用的是 DSP 的晶振輸出,輸出為 33.33M,但是 DSP 也是可以輸出為 30M的,這個我可以修改 DSP 的參數來得到。
我讀取數據的程序如下:
    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

我也用示波器測試了 HCTL2032 的輸入管腳的信號,都是正確的輸入信號,但是所有的輸出管腳都沒有信號輸出,數據端口更沒有波形輸出,我開始用的 DSP 的輸出晶振是 33.33,後來改成 30M,也試了好多30M以下的频率,但是均没有数据输出,我
输入的QEP信号频率为1HZ的正交编码脉冲。
调试了几天,都没有结果,我都怀疑芯片是不是好的了
麻烦版主提点意见。。
I connect the HCTL2032 with the DSP2812,the follow imageshow this
  THE code:

    N1 =1;
    EN2 = 0;
    RSTX = 1;

    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
}

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.



by Sam Lin
I have somesuggestion as below.
1. Please see the HCTL2032’stiming diagrams.
2. You can try another HCTL2032.


by ningliang1111
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.........
for example: 11572->11628->11542->11645->11597->11612...
I couldn't find out  the reason.



by Sam Lin
Could you tell me that Pin 8 and Pin 9 have to connect“High” or “Low” or “floating”?

by ningliang1111
an:  Pin 8 (U/Dx) and Pin 9 (U/Dy)  is "floating "  on my PCB

by Sam Lin
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.


by ningliang1111

  On the datasheet the pin 8&9 description likethis:
"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."

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 .
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.
      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!
     And today ,I have to orderanother piece of HCTL2032, and i will wait few days ,I hope the new chip canmake sense!!
     If you have more suggest or gooddata ,please tell or sent it to me!
   

  Thanks yo give me the  datasheets, But all the data I had see them on your company 's homepage.
     I think I must to think moreabout it.
     Thank you for your help !!



< from Morrihan Avago 產品討論區舊版 2009/6/22 >




TOP

測試hctl2032問題

引用:
原帖由 jessie_adm 於 2010-3-26 13:59 發表
by ningliang1111
您好,由於需要我買了一片 HCTL-2032 的 IC,但是調試了好長的時間都沒有調試好。
我是與 DSP2812 相連的,用來擴展一路 QEP 電路,八根數據線是合 DSP 的數據線相連的,控制線用 DSP 的通用 IO ...
by tsaimfe & chuangcchi                                 
前幾個禮拜有跟你們(台中公司)購買了一些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 Sam
1. 0~65535 : 2的16次方
2. pin6與pin26怎麼接? 還是說您可以把pin6與pin26調整一下? 您有調整過這兩隻pin的high or low嗎?
    En1:high, En2ow On 4X是沒問題.
  
您可以截取您現在2032的基本電路給我看一下嗎?


by chuangcchi    
   我目前在測試上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 >

TOP

發新話題