• slider image 442
  • slider image 497
  • slider image 498
  • slider image 499
  • slider image 500
  • slider image 502
:::


Browsing this Thread:   1 Anonymous Users






Re: PIC18F4520類比數位訊號轉換
#3
版主
版主


查看用戶資訊
有關 PIC18F 的 ADC 函數庫要如何使用是要參考 Peripheral Libraries 的說明的。請詳細閱讀一下:
C:/MCC18/doc/periph-lib/AD Converter.htm

發表於: 2009/7/24 14:58
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC18F4520類比數位訊號轉換
#2
版主
版主


查看用戶資訊
參照:
#pragma config OCS=HS,BOREN=OFF,BORV=2,PWRT=ON,WDT=OFF,LVP=OFF

回覆有關 Configuration 的設定問題: Configuration 的設定字的定義可以在 c:\mcc18\doc 下的 hlpPIC18ConfigSet.heml 檔案查詢。請參考底下的附件。

Attach file:



jpg  (0.00 KB)


發表於: 2009/7/24 14:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


PIC18F4520類比數位訊號轉換
#1
新會員
新會員


查看用戶資訊
請問大家下面程式各行語法的意思....我真的看了好久都看不懂= =''....像是在//結構位元定義中ocs=hs、boren=off等等..這些我在書上查不到到底是什麼意思,為何要這樣??還有//開啟類比訊號轉換模組那邊更是一頭霧水= =''

#include <p18f4520.h>
#include <delays.h>
#include <adc.h>
//結構位元定義
#pragma config OCS=HS,BOREN=OFF,BORV=2,PWRT=ON,WDT=OFF,LVP=OFF
void main()
{
PORTD=0x00;
TRISD=0;
//開啟類比訊號轉換模組
OpenADC(ADC_Fosc_RC
& ADC_LEFT_JUST

& ADC_1ANA_0REF,
ADC_CH0 & ADC_INT_OFF);
while(1)
{
Delay10TCYx(5);
ConvertADC();
while(BusyADC());
PORTD=ADRESH;
}
}

發表於: 2009/7/24 14:41
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... ]

教育訓練中心

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