• 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: 求助!!請問在C18在program flash建立table的方式??
#3
初級會員
初級會員


查看用戶資訊
Ryang大大:
THX!!
我來試試看~~~感恩!!

發表於: 2010/1/15 17:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 求助!!請問在C18在program flash建立table的方式??
#2
版主
版主


查看用戶資訊
看一下 W401 C18 教材裡的第四章及第五章。

http://www.microchip.com.tw/modules/w ... glefile.php?cid=4&lid=236

利用 const rom unsigned char .... 的方式宣告就可以了。
#pragma romdata RomDataSpace=0x400    // 設定 romdata 起始位址在 0x400
rom unsigned char Array1[20]= {0x0F,0x0E,0x0D,0x0C,0x0B,0x0A,0x09,0x08,
                               
0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00};
#pragma romdata            // 恢復為一般 romdata section

unsigned char Count;        
unsigned char Array2[20];        // 宣告陣列變數

void main(void)
{    
 
   Count 
0x00;                 
   
while(Array1[Count++])        // 檢查字元 =0x00 ?
      
{
      
Array2[Count] = Array1[Count];    // 將 ROM 陣列資料存入 RAM 陣列中
      
}
}

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


求助!!請問在C18在program flash建立table的方式??
#1
初級會員
初級會員


查看用戶資訊
各位大大好:
我有一長串資料要呼叫同一個loop去執行輸出動作,之前使用每筆資料去call 這個loop function的方式,程式compiler後會非常的大,以至於塞不下program flash,所以想用建立table的方式來執行,請問要怎麼建立??

發表於: 2010/1/15 0:35
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... ]

教育訓練中心

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