• slider image 442
  • slider image 497
  • slider image 498
  • slider image 499
  • slider image 500
  • slider image 502
:::


Browsing this Thread:   1 Anonymous Users






Re: 請教C30優化的問題
#3
版主
版主


查看用戶資訊
要比較其差異性,建議在 view 下打開 Listing 檔案比較一下就知道了。

發表於: 2009/9/28 11:43
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教C30優化的問題
#2
資深會員
資深會員


查看用戶資訊
timing 控制不可假 compiler 之手,這是常識之一。

完畢。

發表於: 2009/9/26 11:24
The Answer to Life, the Universe, and Everything.
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教C30優化的問題
#1
新會員
新會員


查看用戶資訊
程序量很大,用了c30的s級優化,版主幫我看看下麵這段代碼哪裡被優化了,因為優化謙和優化后採樣值差了一半


spi_sdi_adc是數據輸出端口


unsigned int ads7822(void)
{
uint pppp,tttt;
uchar i;
tttt =0x0800;
pppp=0;

sclk_adc = 0 ;

adc_delay(1);
cs_adc = 0 ;

adc_delay(1);

sclk_adc = 0 ;

adc_delay(1);

sclk_adc = 1 ;

adc_delay(1);

sclk_adc = 0 ;

adc_delay(1);

sclk_adc = 1 ;

adc_delay(1);

sclk_adc = 0 ;

adc_delay(1);

sclk_adc = 1 ;

for(i=0;i<=11;i++)
{

sclk_adc = 0 ;

asm("nop");

adc_delay(1);

if(spi_sdi_adc)
{

pppp |=tttt;

}

tttt >>=1;

sclk_adc = 1 ;

}

asm("nop");

cs_adc = 1;

return(pppp);
}

發表於: 2009/9/26 10:38
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... ]

教育訓練中心

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