• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::

論壇索引


Board index » All Posts (mechwu)




Re: CCS Compiler
資深會員
資深會員



發表於: 2004/8/7 12:06
頂部


Re: pic compiler 問題
資深會員
資深會員



發表於: 2004/7/29 18:06
頂部


Re: 購買dsPIC30F6012及dsPIC6014
資深會員
資深會員


http://www.digikey.com/scripts/DkSear ... =93283&Row=242361&Site=US

6012,25 顆以上,一顆單價 USD 18.49,刷信用卡啦

比 Microchip 網站價貴三塊錢吧,不過阿,Microchip 網站上沒現貨,Digikey 居然還有 135 顆, 呵呵

這家也有
http://www.newark.com/NewarkWebCommer ... ductDetail.jsp?id=88H5570


發表於: 2004/7/28 0:55
頂部


Re: 16F與18F程式轉碼問題
資深會員
資深會員


要用 TBLRD,還得先設定 TBLPTRU, TBLPTRH, TBLPTRL

#define TBLPTRU *(int8 *)(0xFF8) // Addr_Upper
#define TBLPTRH *(int8 *)(0xFF7) // Addr_High
#define TBLPTRL *(int8 *)(0xFF6) // Addr_Low
#define TABLAT *(int8 *)(0xFF5) // Data_Byte

data 從 TABLAT 讀取,有夠煩的,看 data sheet 的 5.4 節吧

別忘了要設定這個喔
BCF 0xFA6, 6 // EECON1, CFGS, select Prog_EE and Data_EE

用 C 寫程式,就可以減少許多這種轉碼的問題,呵呵
看看 C 編譯出來的組語,也可以學會如何轉碼。

建議:去 CCS 下載一套免費的 demo 版玩玩,也可以解決你的問題
http://www.ccsinfo.com/demo.shtml

發表於: 2004/7/21 23:56
頂部


Re: pic內含<比較器>的具體用法
資深會員
資深會員



發表於: 2004/7/10 12:35
頂部


Re: CCS-C 3.203 bug
資深會員
資深會員


CCS-C 3.204 已經把上面那隻蟲解決啦,呵呵,才兩天就出新版

發表於: 2004/7/6 12:29
頂部


Re: ccs 編譯 16c5x 系列的問題
資深會員
資深會員


compile 之後,用 #ROM 指令,人工加上 reset vector 就好啦,再配合 #ORG 指令,就可以指定 main() 的起始位址,就更方便囉

#ROM 0x3FF = {0x...}

Syntax:
#rom address = {list};

Elements:
address is a ROM word address, list is a list of words separated by commas

Purpose:
Allows the insertion of data into the .HEX file. In particular, this may be used to program the '84 data EEPROM, as shown in the following example.

Note that this directive does not prevent the ROM area from being used. See #ORG to reserve ROM.

Examples:
#rom 0x2100={1,2,3,4,5,6,7,8}

Example Files:
None

Also See:
#org

發表於: 2004/7/6 12:24
頂部


CCS-C 3.203 bug
資深會員
資深會員


沒必要的話就不要升級!

// bug_3203_BSR_read_adc.c       by C-H Wu         2004/07/04
//
#include <18F458.H>
#fuses HS, PUT, NOLVP, NODEBUG

#device  ADC=10               // select 10-bit AD results
int16    ad_data;
#byte    ad_data = 0x300      // this line causes ADRESH missing !

#use delay ( clock = 20000000 )
#use rs232 ( baud  = 115200, xmit=PIN_C6, rcv=PIN_C7 )

#zero_ram
void main()
{
   
setup_adc_ports A_ANALOG );
   
setup_adcADC_CLOCK_DIV_32 );
   
set_adc_channel);

   while ( 
)
   {
   
// ad_data = read_adc();   // unmark this line will save the next line !!
                              // because bank select is no longer needed.

      
ad_data read_adc();   // Bug !  MOVFF  ADRESH,ad_data+1  is missing !

      
printf("rn AN0 = %lu "ad_data); delay_ms(1000);
   }
}

發表於: 2004/7/4 17:24
頂部


CCS-C 的一些特性
資深會員
資深會員



發表於: 2004/7/3 10:39
頂部


Re: pic18f8720 boot load問題
資深會員
資深會員


你要用 外部 EEPROM 儲存程式, Microchip 的 AN869 有說明
http://ww1.microchip.com/downloads/en/AppNotes/00869b.pdf

CCS 有套件,60 美金,應該有範例程式,去問問吧

http://www.ccsinfo.com/evalkit8720.shtml#18f8720

18F8720 Mini-proto board
Similar to the 18F6720, however this model includes external EEPROM for developing applications in micro-processor mode.

又,CCS 3.202 的 bug 不少,詳見 CCS 討論區,建議試試3.187 或 3.189。CCS 目前提供下載的是 3.202 和 3.191,很不幸的 3.191 連 delay_us() 都有蟲,請小心。
//bug_3191_delay_us.c
//
#include <18F458.H>
#fuses HS, PUT, NOLVP, NOWDT
#use delay(clock= 40000000)
#use RS232(baud = 115200, xmit= PIN_C6, rcv= PIN_C7)

void main()
{
   
int16 iint8 k0;
   while ( 
)
   {
   
// for(i=0;i<10000;i++) delay_us(100); // 這樣沒蟲
      
for(i=0;i5000;i++) delay_us(200); // 這樣就有蟲!
      
printf("%u ", ++k);
   }
}

發表於: 2004/7/1 11:26
頂部



« 1 ... 13 14 15 (16)



:::

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... ]

教育訓練中心

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