Re: 使用 hex 燒錄 無法動作
|
||||
---|---|---|---|---|
新會員
|
太感謝了tonys
我找到地方了 config 在 倒數第二行 直接拷背上去就能作動了 :02 400E 00BC3F B5 謝謝已解決
發表於: 2007/2/27 14:11
|
|||
|
Re: 使用 hex 燒錄 無法動作
|
||||
---|---|---|---|---|
新會員
|
各位先進
下面兩個 檔 的機械碼指令都一樣 但是只有ok.hex 能夠作動 開機後 gpio 2 45 會亮 有部份是 空碼 nop 及 3ff的不同 程式區是一樣的 0x0000 018A clrf 0x0A 0x0001 2810 goto 0x010 0x0010 3052 movlw 0x52 ; 0x0011 0084 movwf 0x04 ; 52 -> FSR 0x0012 307B movlw 0x7B ; 0x0013 1683 bsf 0x03,5 ; status rp0 0x0014 0081 movwf 0x01 ; 7B -> option-reg 0x0015 3071 movlw 0x71 0x0016 009F movwf 0x1F ; 71 -> ansel 0x0017 3003 movlw 0x03 0x0018 0085 movwf 0x05 ; 03 -> trisio 0x0019 1283 bcf 0x03,5 ; set bank 0 0x001A 138B bcf 0x0B,7 ; intcon 0x001B 1683 bsf 0x03,5 ; set bank 1 0x001C 0199 clrf 0x19 ; clr vfcon 0x001D 1283 bcf 0x03,5 ; set bank 0 0x001E 3080 movlw 0x80 0x001F 009F movwf 0x1F ; 80 -> adcon0 0x0020 3007 movlw 0x07 0x0021 0099 movwf 0x19 ; 07 -> cmcon 0x0022 1505 bsf 0x05,2 ; 2 4 5 set 0x0023 1605 bsf 0x05,4 0x0024 1685 bsf 0x05,5 0x0025 2825 goto 0x025 ; loop type err.hex :100000008A0110280000000000000000000000002D :1000100000000000000000000000000000000000E0 :10002000523084007B308316810071309F00033092 :10003000850083128B1383169901831280309F00F1 :1000400007309900051505168516252800000000C3 :04400E00FF3FFF3F32 :00000001FF type ok.hex :020000040000FA :040000008A01102839 :020008000900ED :10002000523084007B308316810071309F00033092 :10003000850083128B1383169901831280309F00F1 :0C004000073099000515051685162528C7 :02400E00BC3FB5 :00000001FF
發表於: 2007/2/27 12:35
|
|||
|
Re: 使用 hex 燒錄 無法動作
|
||||
---|---|---|---|---|
高級會員
|
>>這兩支程式 在 軟體模擬時 都可正常運作
檢查一下AD ,Timer source 或比較器 功能有沒有關閉 而GP3 input only
發表於: 2007/2/27 10:08
|
|||
|
Re: 使用 hex 燒錄 無法動作
|
||||
---|---|---|---|---|
初級會員
|
發表於: 2007/2/27 9:45
|
|||
|
Re: 使用 hex 燒錄 無法動作
|
||||
---|---|---|---|---|
初級會員
|
確認一下PIC單晶片的燒錄設定,以PIC12F675為例,如下:
1. Oscillator, 選擇Internal RC No Clock 。 2. Watch Dog, 若程式中有CLRWDT指令出現,則設定為ON 。 3. Power Up Timer, 設定為ON 。 4. Master Clear Enable, 設定為External 。 5. Brown Out Detect, 設定為ON 。 6. Code Protect, 設定為OFF 。 7. Data EE Read Protect, 設定為OFF 。 Try Run看看是否能解決PIC單晶片無法正常動作的問題。
發表於: 2007/2/27 9:13
|
|||
|
Re: 使用 hex 燒錄 無法動作
|
||||
---|---|---|---|---|
初級會員
|
確認一下PIC單晶片的燒錄設定,以PIC12F675為例,如下:
1. Oscillator, 選擇Internal RC No Clock 。 2. Watch Dog, 若程式中有CLRWDT指令出現,則設定為ON 。 3. Power Up Timer, 設定為ON 。 4. Master Clear Enable, 設定為External 。 5. Brown Out Detect, 設定為ON 。 6. Code Protect, 設定為OFF 。 7. Data EE Read Protect, 設定為OFF 。 Try Run看看是否能解決PIC單晶片無法正常動作的問題。
發表於: 2007/2/27 9:12
|
|||
|
Re: 使用 hex 燒錄 無法動作
|
||||
---|---|---|---|---|
新會員
|
這兩支程式 在 軟體模擬時 都可正常運作
再請教 校正值 一定要做嗎 還有是 校正值如何產生的? 謝謝
發表於: 2007/2/26 22:17
|
|||
|
使用 hex 燒錄 無法動作
|
||||
---|---|---|---|---|
新會員
|
大家好:
我在用 icd2 燒錄 hex 1 請問是否有較快的軟體 2 mpasm 燒錄 hex 無法動作 按照原程式 重編 asm 即可作動正常 3 使用ic p12f675 好像是 校正值最後一碼有問題 因為我用對照敲 機械碼 也一樣 有問題的hex 還是不能作動正常 =====可燒錄 作動的 資料 :020000040000FA :100000001228FF3FFF3FFF3FFF3FFF3FFF3FFF3F04 :10001000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FF0 :1000200083167B30810071309F000330850083127E :100030000515051685161B28051685161E280000B1 ...................... :02400E00FF0FA2 :08400000FF3FFF3FFF3FFF3FC0 :0207FE002C3499 :00000001FF 有問題的資料 :020000040000FA :1000000000001028000000000000000000000000B8 :1000100000000000000000000000000000000000E0 :100020007B308316810071309F000330850083127E :100030000515051685161B28FF3FFF3FFF3FFF3FB5 :10004000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FC0 .................. :02400E00BC0FE5 :08400000FF3FFF3FFF3FFF3FC0 :0207FE002C3499 :00000001FF 程式內容很簡單 只是 將三支gpio 輸出high 使用 內部時脈 4m 謝謝 協料
發表於: 2007/2/26 22:13
|
|||
|