Re: 請教關於configuration bit..mcu mode 問題
|
||||
---|---|---|---|---|
高級會員
|
謝謝各位前輩的回應
我後來有將應用程式位址改到0x0800開始.. 選擇Ex Microcontroller模式去燒錄... 我圖形資料放在外掛rom 0xc000開始... 主程式連bootloader程式燒入後開機... 感覺程式是有在run..但顯示亂跳不正確.. 好像整個圖形的取碼位址整個亂掉..然後就當掉.. 但是只要拿掉bootloader程式後就沒問題... 我會另外再試別的寫法看看..謝謝 另外有一個問題想請教.. 我將 c018i.c 修改位址 0x0800 然後複製到程式目錄底下...並加入到專案中.. 再把 lkr 的 FILES c018i.o 給mark掉... (因為complier會出現redefine的錯誤訊息).. 這樣做有沒有什麼問題??... 感謝各位~祝 2007 新年快樂
發表於: 2007/1/2 11:03
|
|||
|
Re: 請教關於configuration bit..mcu mode 問題
|
||||
---|---|---|---|---|
中級會員
|
參照:
TYPO? 0x0800
發表於: 2006/12/30 20:05
|
|||
|
Re: 請教關於configuration bit..mcu mode 問題
|
||||
---|---|---|---|---|
版主
|
從 Data sheet 裏看一下 Special Function of MCU 理有關 CONFIG5H 暫存器的說明:
bit 7 CPD: Data EEPROM Code Protection bit 1 = Data EEPROM not code-protected 0 = Data EEPROM code-protected bit 6 CPB: Boot Block Code Protection bit 1 = Boot Block (000000-0007FFh) not code-protected 0 = Boot Block (000000-0007FFh) code-protected bit 5-0 Unimplemented: Read as ‘0’ Bootloader 區域是固定在前面2KBytes 的位址,應用程式一定要在 0c0800 開始。
發表於: 2006/12/27 13:48
|
|||
|
Re: 請教關於configuration bit..mcu mode 問題
|
||||
---|---|---|---|---|
高級會員
|
謝謝版大..
在 configuration bit 中 boot block size 不是可以選擇1K Word .. 另外我的情況是.. 有外掛rom...然後又加入bootloader功能.. 這樣做是不是有什麼問題???
發表於: 2006/12/27 11:55
|
|||
|
Re: 請教關於configuration bit..mcu mode 問題
|
||||
---|---|---|---|---|
版主
|
PIC18F87xx Bootloader 位址是從 0x0000 ~ 0x7FF , 這段區域可是是被保護的 (Code Protected ) , 應用程式 download 應從 0x0800 以後的位址擺放。如果有外掛 ROM 的話 在設計初期是否可以先用 Microcontroller Mode 來測試,待功能正常後在轉到外部的 ROM 來執行。
發表於: 2006/12/27 11:06
|
|||
|
Re: 請教關於configuration bit..mcu mode 問題
|
||||
---|---|---|---|---|
高級會員
|
謝謝版大...
MCU使用 18LF8527...可能會換18LF8520
發表於: 2006/12/27 10:22
|
|||
|
Re: 請教關於configuration bit..mcu mode 問題
|
||||
---|---|---|---|---|
版主
|
請問你是用哪一顆 PIC ?
發表於: 2006/12/27 9:57
|
|||
|
請教關於configuration bit..mcu mode 問題
|
||||
---|---|---|---|---|
高級會員
|
請教各位前輩..
小弟最近把一個bootloader程式整合進一個 有外掛rom系統的程式裡... configuration bits 中processor mode中 我是應該設為 w/Boot 模式?..還是Ex Microcontroller? bootloader是asm寫的..主程式是用C18... complier成功後.. 我有查看mplab program memory裡的資料.. 確定bootloader程式有在0000h~01ffh內 interrupt的re-map也是正確的... 主程式配置的位置也沒錯... 但..原本用Ex Microcontroller模式燒錄... 程式發生問題..開機時不是無反應就是很快就死當? 後來改成w/Boot模式試試看 結果好像外掛rom的部份都沒動作..也是死當.. 請問是否有哪裡沒有設定好??? 謝謝
發表於: 2006/12/27 9:54
|
|||
|