• 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: PIC24F問題
#2
版主
版主


查看用戶資訊
這問題出在 dsPIC30F & PIC24 兩者之間的使用位元的位址不一樣。你必須參考 PIC24FJ128GA006.h 檔案裡的定義,如下所示: (它在 IFS1bits.MI2C1IF 裡)
extern volatile unsigned int  IFS0 __attribute__((__sfr__));
typedef struct tagIFS0BITS {
  
unsigned INT0IF:1;
  
unsigned IC1IF:1;
  
unsigned OC1IF:1;
  
unsigned T1IF:1;
  
unsigned :1;
  
unsigned IC2IF:1;
  
unsigned OC2IF:1;
  
unsigned T2IF:1;
  
unsigned T3IF:1;
  
unsigned SPF1IF:1;
  
unsigned SPI1IF:1;
  
unsigned U1RXIF:1;
  
unsigned U1TXIF:1;
  
unsigned AD1IF:1;
IFS0BITS;
extern volatile IFS0BITS IFS0bits __attribute__((__sfr__));

extern volatile unsigned int  IFS1 __attribute__((__sfr__));
typedef struct tagIFS1BITS {
  
unsigned SI2C1IF:1;
  [
color=ff0000]unsigned MI2C1IF:1; [/color]
  
unsigned CMIF:1;
  
unsigned CNIF:1;
  
unsigned INT1IF:1;
  
unsigned :4;
  
unsigned OC3IF:1;
  
unsigned OC4IF:1;
  
unsigned T4IF:1;
  
unsigned T5IF:1;
  
unsigned INT2IF:1;
  
unsigned U2RXIF:1;
  
unsigned U2TXIF:1;
IFS1BITS;
extern volatile IFS1BITS IFS1bits __attribute__((__sfr__));

發表於: 2009/12/4 14:22
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


PIC24F問題
#1
新會員
新會員


查看用戶資訊
我用PIC24FJ128GA006寫I2C的程式
使用 IFS0bits.MI2CIF 這個檢查位
不過build時出現沒有這個腳位名稱
用MI2CIF或_MI2CIF也不行
我看30F系列都是用這個名稱
難道是24F的名稱不一樣嗎?
我試了很多名稱都錯誤,請大大幫我解答

發表於: 2009/12/2 20:31
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... ]

教育訓練中心

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