• 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: 請問PIC30F5011的bit要如何設定
#3
新會員
新會員


查看用戶資訊
非常謝謝!我了解了!

發表於: 2009/3/17 8:06
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問PIC30F5011的bit要如何設定
#2
版主
版主


查看用戶資訊
C30 的位元定義要使用位元結構的方式宣告,可以參考它的 p30f5011.h 裡的方法,這種方式是標準的 ANSI C 規則也是基本。

extern volatile unsigned int TRISE __attribute__((__sfr__));
typedef struct tagTRISEBITS {
unsigned TRISE0:1;
unsigned TRISE1:1;
unsigned TRISE2:1;
unsigned TRISE3:1;
unsigned TRISE4:1;
unsigned TRISE5:1;
unsigned TRISE6:1;
unsigned TRISE7:1;
unsigned TRISE8:1;
unsigned TRISE9:1;
} TRISEBITS;
extern volatile TRISEBITS TRISEbits __attribute__((__sfr__));

extern volatile unsigned int PORTE __attribute__((__sfr__));
typedef struct tagPORTEBITS {
unsigned RE0:1;
unsigned RE1:1;
unsigned RE2:1;
unsigned RE3:1;
unsigned RE4:1;
unsigned RE5:1;
unsigned RE6:1;
unsigned RE7:1;
unsigned RE8:1;
unsigned RE9:1;
} PORTEBITS;
extern volatile PORTEBITS PORTEbits __attribute__((__sfr__));

發表於: 2009/3/16 15:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問PIC30F5011的bit要如何設定
#1
新會員
新會員


查看用戶資訊
請問PIC30F5011的 bit 要如何宣告

例如 char的宣告 --> unsigned char 變數名稱

可是bit的宣告-->我用 bit 變數名稱 例如-->bit tt;
MPLAB IDE 8.10版 Complier後,會出現錯誤!

請問關於 bit 的宣告,要如何設定!
謝謝!

發表於: 2009/3/14 8:04
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... ]

教育訓練中心

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