• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   1 Anonymous Users






Re: PIC16F87XA-PIC16F88X Migration problem
#5
高級會員
高級會員


查看用戶資訊
應該是picc版本的問題,同樣的程式,用9.70 pro 的確可以,用9.50 pl2就是不行…

非常感謝Ryang and 2bod的熱心答覆。

發表於: 2010/1/20 14:38
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F87XA-PIC16F88X Migration problem
#4
中級會員
中級會員


查看用戶資訊
參照:

ak47 寫道:
我如連下兩個config的定義,它卻出現error,我是用MPLAB 8.36+PICC 9.50PL2

__CONFIG(HS & WDTDIS & PWRTDIS & MCLREN & LVPDIS & BORDIS & IESODIS & FCMEN & CP & DEBUGDIS);
__CONFIG(BORV40 & WP1 & WP2);

Error [491] ; . can't find 0x2 words for psect "config" in segment "CONFIG"


這是我寫PIC16F886的成功範例,請參考
__CONFIG(LVPDIS & FCMDIS & IESODIS & PROTECT & CPD & BOREN & MCLRDIS & PWRTEN & WDTEN & HS);
__CONFIG(BORV40 & WP2);

對了你的MPLAB IDE上面->Configure->Select Device 要改成PIC16F886喔

發表於: 2010/1/20 13:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F87XA-PIC16F88X Migration problem
#3
高級會員
高級會員


查看用戶資訊
我如連下兩個config的定義,它卻出現error,我是用MPLAB 8.36+PICC 9.50PL2

__CONFIG(HS & WDTDIS & PWRTDIS & MCLREN & LVPDIS & BORDIS & IESODIS & FCMEN & CP & DEBUGDIS);
__CONFIG(BORV40 & WP1 & WP2);

Error [491] ; . can't find 0x2 words for psect "config" in segment "CONFIG"

發表於: 2010/1/20 11:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F87XA-PIC16F88X Migration problem
#2
版主
版主


查看用戶資訊
PIC16F88x 系列有 0x2007 (CONFIG1) & 0x2008 (CONFIG2) 兩個位置。
組語部分參考 : C:\Program Files\Microchip\MPASM Suite\Template\Object 裡的參考範例。

Hi-Tech PICC 要參考 C:\Program Files\HI-TECH Software\PICC\9.70\include\p16f877.h 檔案最後面的定義。使用時可以用底下的方式直接用兩次的 _ _ CONFIG 來定義兩個 Configuration Register: ( 底下為使用 PIC16F1937 的例子,也是有兩個 CONFIG 的)

// ************ 設定 PIC16F1937 Configuration Bits ******
// 有關此設定的定義字請參考 pic16f1937.h 檔的說明
//
__CONFIG ( FOSC_INTOSC & WDTE_OFF & PWRTE_OFF & MCLRE_ON & CP_OFF & BOREN_ON & CLKOUTEN_ON
& IESO_OFF & FCMEN_OFF);
__CONFIG ( FCMEN_OFF & VCAPEN_OFF & PLLEN_ON & STVREN_OFF & BORV_27 & LVP_OFF);

發表於: 2010/1/18 18:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


PIC16F87XA-PIC16F88X Migration problem
#1
高級會員
高級會員


查看用戶資訊
我將原PIC16F876A的板子換成PIC16F886,並依PIC16F87XA-PIC16F88X Migration.pdf 修改好code,但__CONFIG(xx)只能定義886的第一個configuration bits,請問如何用__CONFIG()定義886的第二個configuration bits.

註:我是使用MPLAB 8.36+PICC 9.50PL2 compile

發表於: 2010/1/18 17:39
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... ]

教育訓練中心

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