• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::


Browsing this Thread:   1 Anonymous Users






Re: 請教A/D轉換問題
#4
初級會員
初級會員


查看用戶資訊
謝謝已找到問題所在,ADCON2的ADFM左取跟右取搞錯了

發表於: 2005/6/1 8:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教A/D轉換問題
#3
版主
版主


查看用戶資訊
PIC18F2431 ADC 初始程式,參考看看,使用兩個取樣電路:


Init_ADC:
    
movlw    b'00011001'             Set A/for Single ShoT Mode Multi-Channel
    movwf    ADCON0                
Two Samples with Group A B
    movlw    
b'00000000'            Set A/D input channel for AN0 AN1
    movwf    ADCHS
    movlw    
b'00000011'            Set ANO AN1 as A/D input
    movwf    ANSEL0
    movlw    
b'00010000'            ;FIFO enabled
    movwf    ADCON1
    movlw    
b'00110010'            ;Result left justifiedTaq=12TadTadc=Fosc/32
    movwf    ADCON2
    movlw    
b'01000000'            ;Interrupt when 2nd and 4th word written to FIFO
    movwf    ADCON3
    movlw    
b'00000000'
    
movwf    ANSEL1
    bsf    ADCON0
,GO
    bsf    PIE1
,ADIE            ;AD Converter Interrupt enable
    
RETURN
;
;*****************************************************    
    
ISR_HIGH

    bcf    PIR1
,ADIF        ;ADIF flag is cleared for next interrupt
    movff    ADRESL
,MOTOR_CURRENTL
    movff    ADRESH
,MOTOR_CURRENTH
    movff    ADRESL
,SPEED_REFL
    movff    ADRESH
,SPEED_REFH
    
    RETFIE    FAST

發表於: 2005/5/27 20:23
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教A/D轉換問題
#2
初級會員
初級會員


查看用戶資訊
上面的問題意思,有輸出才對,是輸出不會隨著我的類比輸入改變而改變數位訊號,一直保持數位訊號最大值

發表於: 2005/5/26 11:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教A/D轉換問題
#1
初級會員
初級會員


查看用戶資訊
我在類比輸入接了0~5V的VR,我要把類比轉換為10BIT數位輸出,但是一直沒有輸出,我用的是18F2431,各位先進可以告訴我需要注意哪些地方?謝謝

發表於: 2005/5/26 11:33
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------