• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 如何同時使用兩組 ADC ?
#6
資深會員
資深會員


查看用戶資訊
請使用外部電路做Level shift,這樣就能這樣就能量負電壓輸入。
電路圖裡面的2.5v可以直接用MCP1525產生。
其中綠色是輸入+-1.0v的信號,輸出是紅色2.5+-1.0v的信號。

Attach file:



jpg  (0.00 KB)


jpg  (0.00 KB)


發表於: 2008/11/24 14:37

Edited by master on 2008年11月24日 16:17:47
Edited by master on 2008年11月24日 16:20:14
不要問我哪裡來,我只是個流浪天涯的工程師
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何同時使用兩組 ADC ?
#5
初級會員
初級會員


查看用戶資訊
請問一下
所以這樣的意思是

如果我給他的電壓 VDD/VSS 是 +5V/0V

我沒有辦法讓我的 Vref- 是負的嗎?

謝謝回答

發表於: 2008/11/24 14:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何同時使用兩組 ADC ?
#4
資深會員
資深會員


查看用戶資訊
Vref+/Vref- 的最大電壓範圍就是電源電壓 VDD/VSS

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


Re: 如何同時使用兩組 ADC ?
#3
初級會員
初級會員


查看用戶資訊
了解
謝謝你

另外,如果我想要設定我的 Vref+ (AN3) 和 Vref- (AN2)

可以問一下 Vref+/Vref- 的最大電壓可以給多少?

發表於: 2008/11/18 17:35
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何同時使用兩組 ADC ?
#2
資深會員
資深會員


查看用戶資訊
有好幾組 AD 通道,但只有一組Sample/Hold 與一組轉換器。

因此,兩組 I/O 要先設成 Analog,先選一組通道,轉完再切換另一通道。

更換通道後,應先等待一小段時間 (Datasheet 上的 Sample/Hold Time),讓取樣電容重新取樣(充電)完成,才不會有誤差。


※ 要有 2 組或以上 Sample/Hold 與/或 轉換器,真正“同時”抓資料來轉換的話,dsPIC 裡有,PIC24 不太確定‧‧‧

發表於: 2008/11/18 17:22
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


如何同時使用兩組 ADC ?
#1
初級會員
初級會員


查看用戶資訊
各位好
我這邊需要同時用到兩個 AD
例如: AN0, AN1

我的程式簡單來說是如以下:

void main (void)
{

PORTD = 0x00;
TRISD = 0;

ADCON0=0x01; // 選擇AN0通道轉換,開啟ADC模組
ADCON1=0x0E; // 使用VDD,VSS為參考電壓,設定AN0為類比輸入
ADCON2=0x3A; // 結果向左靠齊並設定轉換時間為Fosc/32,採樣時間為20TAD




while(1)
{
Delay10TCYx(5); //時間延遲以完成採樣
ConvertADC() ; //進行訊號轉換
while(BusyADC()); //等待轉換完成


adcvalue = ReadADC()>>6;
delay_ms(1000);
}
}

我以上程式是設定可以讓 AN0 當作我的 analog input
然後武可以直接去讀他的值是多少

如果我現在希望可以把
AN0 和 AN1 兩支腳 的值都讀進來
要如何去寫?

可以直接改我的 ADCON1 讓 AN0 和 AN1 的腳都是 analog
可是這樣
我用 ReadADC 它會讀到的資料是什麼

那我 ADCON0 該如何設定?

謝謝回答!

edit: 我希望可以在同一個時間讀/存這兩支腳的value

發表於: 2008/11/18 14:53

Edited by ventrox on 2008年11月18日 15:24:58
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... ]

教育訓練中心

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