次シリーズのプロジェクトを作る際に RRP1320-1-03-1 をコピーして使おうとしたところ、Configuration Bits ウィンドウの Configuration Bits set in code にチェックが入っていることに気付きました。 新品のPIC( 18F1320 )だからでしょうか? 当ブログやダウンロードコーナーで入手したプロジェクトをビルドしても正常に動作しない場合は、このチェックを外してビルドし直してください。
Configure → Configuration Bits を選択します。
Configuration Bits set in code のチェックを外して、下図の表示を確認して下さい。
RRP1320-1 シリーズの Configuration Bits
RRP1320-1シリーズ・コンフィグレーションビットの値とフィールド/設定は以下の通りです。 ソースに記述する場合は参考にして下さい。
Address Value Field Setting
300001 48 OSC Internal RC oscillator, port function on RA6 and port function on RA7
FSCM Fail-Safe Clock Monitor enabled
IESO Internal External Switchover mode disabled
300002 0F PWRT PWRT disabled
BOR Brown-out Reset enabled
BORV Reserved
300003 1E WDT WDT disabled (control is placed on the SWDTEN bit)
WDTPS 1:32768
300005 80 MCLRE MCLR pin enabled, RA5 input pin disabled
300006 01 STVR Stack full/underflow will cause Reset
LVP Low-Voltage ICSP disabled
300008 03 CP0 Block 0 (00200-000FFFh) not code-protected
CP1 Block 1 (001000-001FFFh) not code-protected
300009 C0 CPB Boot Block (000000-0001FFh) not code-protected
CPD Data EEPROM not code-protected
30000A 03 WRT0 Block 0 (00200-000FFFh) not write-protected
WRT1 Block 1 (001000-001FFFh) not write-protected
30000B E0 WRTC Configuration registers (300000-3000FFh) not write-protected
WRTB Boot Block (000000-0001FFh) not write-protected
WRTD Data EEPROM not write-protected
30000C 03 EBTR0 Block 0 (00200-000FFFh) not protected from table reads executed in other blocks
EBTR1 Block 1 (001000-001FFFh) not protected from table reads executed in other blocks
30000D 40 EBTRB Boot Block (000000-0001FFh) not protected from table reads executed in other blocks
「楽々PIC」は楽しい道具を作りながら学ぶブログを目指します。