• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 使用 hex 燒錄 無法動作
#9
新會員
新會員


查看用戶資訊
太感謝了tonys
我找到地方了
config 在 倒數第二行 直接拷背上去就能作動了
:02 400E 00BC3F B5


謝謝已解決

發表於: 2007/2/27 14:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用 hex 燒錄 無法動作
#8
資深會員
資深會員


查看用戶資訊
PIC 的 Confuguration 設定是很重要的,不可忽略。

Confuguration 可以在程式中設定,並包含在 hex 中。
也可以最後在 MPLAB 中再更改,但小心勿忘。

我幫你分別 Import 進 mplab ,只先看了一下 Configuration,沒看程式:
以上 hex 檔均含有 Confuguration

err.hex 使用 External RC ClockOut , 因此 CLKIN 請接 RC作振盪 ,pic 才會會有 Clock 來執行程式,未如此接則自然程式不會動,另此時 CLKOUT 會輸出 Clock , GP5, GP4 不能用

ok.hex 使用 Internal RC NoClockOut , GP5, GP4 可作 I/O , 內部振盪 OK!

最先發文說要用內部振盪,也有類似情況,但你描述相反,說可行的卻用 External RC ClockOut ,說不行的才是用內部振盪 Internal RC NoClockOut 。

發表於: 2007/2/27 14:01
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用 hex 燒錄 無法動作
#7
新會員
新會員


查看用戶資訊
各位先進
下面兩個 檔 的機械碼指令都一樣
但是只有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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用 hex 燒錄 無法動作
#6
高級會員
高級會員


查看用戶資訊
>>這兩支程式 在 軟體模擬時 都可正常運作

檢查一下AD ,Timer source 或比較器 功能有沒有關閉
而GP3 input only

發表於: 2007/2/27 10:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用 hex 燒錄 無法動作
#5
初級會員
初級會員


查看用戶資訊
關於校正值,請參見以下的超連結,之前已有人提出討論

請問PIC12F629 的 Internal Oscillator需要校正嗎?

發表於: 2007/2/27 9:45
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用 hex 燒錄 無法動作
#4
初級會員
初級會員


查看用戶資訊
確認一下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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用 hex 燒錄 無法動作
#3
初級會員
初級會員


查看用戶資訊
確認一下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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用 hex 燒錄 無法動作
#2
新會員
新會員


查看用戶資訊
這兩支程式 在 軟體模擬時 都可正常運作

再請教 校正值 一定要做嗎 還有是 校正值如何產生的?

謝謝

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


使用 hex 燒錄 無法動作
#1
新會員
新會員


查看用戶資訊
大家好:
我在用 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
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... ]

教育訓練中心

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