• 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: 再請問一下c18,謝謝
#2
初級會員
初級會員


查看用戶資訊
Microchip MPLAB 可以預載 configure Bits, 你所列的方式只適用於組合語言 (Assembly) 之用. 若你是使用 MPLAB C18, 也想預載 configure Bits, 請參考下述方式. 您也可以參考右方 "教材及講義" 中的 WAP002, 以獲取完整之用法.

以 PIC18F452 為例:
建立一個檔案 - P18config.c, 將虛線內之內容複製進去, 存檔後, 將此檔加入專案中, 重新編譯即可. 祝您好運. (此內容只是範例, 請參考 PIC18F452 的 Program Spec 修改其內容.)
-----------------------------------------------------------------------
#pragma romdata CONFIG
const rom unsigned char CONFIG1L=0xff ;
const rom unsigned char CONFIG1H=0b00100010 ;
const rom unsigned char CONFIG2L=0b00000001 ;
const rom unsigned char CONFIG2H=0b00000000 ;
const rom unsigned char CONFIG3L=0xff ;
const rom unsigned char CONFIG3H=0b00000000 ;
const rom unsigned char CONFIG4L=0b00000001 ;
const rom unsigned char CONFIG4H=0xff ;
const rom unsigned char CONFIG5L=0b00001111 ;
const rom unsigned char CONFIG5H=0b11000000 ;
const rom unsigned char CONFIG6L=0b00001111 ;
const rom unsigned char CONFIG6H=0b11100000 ;
const rom unsigned char CONFIG7L=0b00001111 ;
const rom unsigned char CONFIG7H=0b01000000 ;
#pragma romdata
-----------------------------------------------------------------------
Weikeng FAE Tony Fu

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


再請問一下c18,謝謝
#1
初級會員
初級會員


查看用戶資訊
請問:
在組合語言中,可以在其中加入例如:
__CONFIG _CP_OFF & _WDT_ON & _BODEN_ON & _PWRTE_ON & _RC_OSC & _WRT_ENABLE_ON & _LVP_ON & _DEBUG_OFF & _CPD_OFF

爾後就可以不用去選單中設定,但是在c18中該如何做呢??謝謝您的協助!!

發表於: 2004/10/10 15:56
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... ]

教育訓練中心

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