Re: 為什麼TBLRD*指令在C18中不能用嵌入式組語?
|
||||
---|---|---|---|---|
資深會員
|
1.請問dataPacket.ADR.low這個變數是??
我看過flash的datasheet好像沒有類似的暫存器 不知道是那來的?? 2.又除了write之外,可有read的函式可供參考? 3.又所謂的tblrd的基本型是指不加任何*或+-符號嗎? 因為我看datasheet說明最少都有加一個*,不知道不加任何 符號有意義嗎?
發表於: 2008/3/25 22:31
|
|||
|
Re: 為什麼TBLRD*指令在C18中不能用嵌入式組語?
|
||||
---|---|---|---|---|
管理員
|
Hi 你好,
TBLRD 指令在 MPLAB C18 的嵌入式組合言只能用基本型. 如果要用 C 的話可以參考以下寫法 : ( 取自 Microchip USB bootloader 中 boot.c 的片段 , 若 Install 了 Microchip USB F/W 後可以在 c:\MCHPFSUSB\fw\boot\system\usb\class\boot 找到 :)
void WriteProgMem(void) //TESTED: Passed
發表於: 2008/3/25 18:05
|
|||
|
為什麼TBLRD*指令在C18中不能用嵌入式組語?
|
||||
---|---|---|---|---|
資深會員
|
我試著想把FLASH的讀寫寫成C語言函式 發現TBLRD 和TBLWT這兩個指令無法相對應 試著用 _ASM TBLRD* _ENDASM compile就會出現錯誤 改成 TBLRD又沒問題,但組語好像沒有這種用法 只要TBLRD後面加上有+或*的都不行 不知道大家都怎麼處理C語言寫FLASH內呢
發表於: 2008/3/24 23:50
|
|||
|