• slider image 442
  • slider image 492
  • slider image 493
  • slider image 494
  • slider image 495
  • slider image 496
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#10
版主
版主


查看用戶資訊
1. Bootloader 主體程式會燒在 PIC Bootload 區塊,一般會保護起來,這段程式只能透過 ICSP 的方式燒錄,一般都是第一次以燒錄器的方式連 Config. 的設定一起燒錄。Bootloader 程式執行一定是從0x0000 Reset vector 開始,並有中斷轉移的設計機制。
2.要用 Bootloader 來 download 的程式。此程式的執行位址有特別安排過不是從 0x0000 reset vector 開始,所以在編譯時要做一些位址上的處理。他跟一般的程式不一樣,也不含有 Config. 的設定資料。
3. 是的,Config. 的位址只有用 Table Point 才看的到。

發表於: 2008/1/25 14:41
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#9
高級會員
高級會員


查看用戶資訊
不好意思~忘記問另外一個問題了! 這顆Pic 18f4550 有支援bootloader 燒錄 那我的hex 檔有包含Configuration Bits 的話!這樣處理的到嗎!? PC 不是只有21 Bit?
拍謝阿...一直問蠢問題...

恩 沒問題了...燒錄的時候是靠Table Pointer 來定址...24Bit?
是這樣沒錯吧!?

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


Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#8
高級會員
高級會員


查看用戶資訊
哈 不好意思.我腦殘! 剛剛才了解你的意思...真的很感謝!!

發表於: 2008/1/24 17:10
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#7
版主
版主


查看用戶資訊
所以我說再用 File-->Export 送出 HEX 檔出來,這個 HEX 檔就會含有 Config. 的設定資料,拿去萬用燒錄器燒路就OK啦!
不過,燒錄前還是要在檢查一下 Config. 的設定。

發表於: 2008/1/24 15:54
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#6
高級會員
高級會員


查看用戶資訊
所以我是想問~
用您說的第2種方法
(在 MPALB IDE 下,用人工選擇的方式設定所需的Config.設定值,(Configuration Bits set in code 不打勾))

所產生出的hex 檔裡面,就不會有Configuration Bits的設定囉!? 那我拿去萬用燒錄器燒 就會出問題了!?

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


Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#5
版主
版主


查看用戶資訊
Configuration Bits 的設定方式有兩種:
1. 寫程式時利用 Microchip 所提供的 Macor 來設定,這樣 Config. 的設定就會跟著程式走,只要重新編譯就會自動產生 Config. 設定的 HEX 資料。
2. 在 MPALB IDE 下,用人工選擇的方式設定所需的Config.設定值,(Configuration Bits set in code 不打勾)
3. 在 File 下,Export 出去的 HEX code 會含有 Config. 的燒錄 HEX 資料,再 Import 進來也是可以的。

發表於: 2008/1/24 9:24
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#4
高級會員
高級會員


查看用戶資訊
謝謝~所以您是說,
要是我在設計Project的時候Configuration Bits 的設定
是利用MPLAB 的 Configuration Bits設定,並且把Configuration Bits set in code 勾掉
那我之後build 的hex 檔 就沒有Configuration Bits 的設定囉!?
那拿去萬用燒錄器燒 就會有問題?


發表於: 2008/1/23 17:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#3
版主
版主


查看用戶資訊
Config 的位址是在 LKR 檔裡定的。如何使用請看 : C:\mcc18\doc\hlpPIC18ConfigSet.chm 裡的說明。
--------------------    MPLAB C18   ----------------------------------------

;*******************************************************************************
;*
3.For MPLAB C18 V2.40 or higher, use #pragma config directive                       *
;*for example *    
//******************************************************************************
    #include <p18f452.h>
//*******************************************************************************
//*Configuration settings may be specified with multiple #pragma config directives.          *
//*MPLAB C18 verifies that the configuration settings specified are valid for the processor*
//*for which it is compiling   *            
//*The labels following the directive "pragma config" are defined in the P18F452.h file.    *
//*******************************************************************************
    #pragma config    OSC=HS
    #pragma config     PWRT=ON
    #pragma config     BOR=OFF, BORV=42
    #pragma config     WDT=OFF
    #pragma config      CCP2MUX=ON
    #pragma config      STVR=OFF, LVP=OFF, DEBUG=OFF
    #pragma config      CPD=OFF
    
void main(void)
{
//your code
}
//********************************************************************************

HEX 檔裡不依定會含有 configuration Bits 的燒錄資料,如果你在城市裡有加入 #pragma config xxxxx 的設定,那編譯過的 HEX 檔就會有 config 的燒錄資料。

發表於: 2008/1/23 15:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 hex檔裡是否已有包含 Configuration Bits設定?
#2
高級會員
高級會員


查看用戶資訊
若你沒有將configure bits的設定寫在程式裡,那麼你產生的hex就不可能含configure bits。
你可以參考官方的這份文件,裡面有說明的很清楚"PIC Microcontroller Configuration Bits DN009"

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


請問 hex檔裡是否已有包含 Configuration Bits設定?
#1
高級會員
高級會員


查看用戶資訊
我用的這顆pic是 18f4550
他的Configuration Bits 設定 旁邊是寫從
300000h 開始
可是 User Memory Space 不是只有到 1FFFFFh (PC 21 bits)
那這個300000h 是在哪邊?誰來定址?
另外 這個Configuration Bits 設定 有包含在 MPLAB 所產生的hex檔裡面嗎!? (照理說應該是包在hex檔裡面的吧?)

那我用MPLAB Import 一個hex file 來燒錄,
Configuration Bits 設定 還有用嗎!?
對不起喔~我才剛學,問蠢問題請多包容...感恩!


發表於: 2008/1/23 13:44
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... ]

教育訓練中心

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