Re: PIC16F87XA-PIC16F88X Migration problem
|
||||
---|---|---|---|---|
高級會員
|
應該是picc版本的問題,同樣的程式,用9.70 pro 的確可以,用9.50 pl2就是不行…
非常感謝Ryang and 2bod的熱心答覆。
發表於: 2010/1/20 14:38
|
|||
|
Re: PIC16F87XA-PIC16F88X Migration problem
|
||||
---|---|---|---|---|
高級會員
|
我如連下兩個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
|
|||
|
Re: PIC16F87XA-PIC16F88X Migration problem
|
||||
---|---|---|---|---|
版主
|
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
|
|||
|
PIC16F87XA-PIC16F88X Migration problem
|
||||
---|---|---|---|---|
高級會員
|
我將原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
|
|||
|