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


Browsing this Thread:   1 Anonymous Users






Re: dsp33ch的p33CH512MP508.h file不能更改
#4
管理員
管理員


查看用戶資訊
CH 系列是 Dual Code 的系列, 有些暫存器不是兩邊都有的,
Master Code 請服用 p33CH512MP508.h
Slave Code 則使用 p33CH512MP508S1.h

DIFF0, DIFF1 在 Slave Code 才有.

Attach file:



jpg  (0.00 KB)


發表於: 2020/5/15 12:13
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: dsp33ch的p33CH512MP508.h file不能更改
#3
新會員
新會員


查看用戶資訊
您好

可是像原來
typedef struct tagADMOD0LBITS {
uint16_t SIGN0:1;
uint16_t :1;
uint16_t SIGN1:1;
uint16_t :1;
uint16_t SIGN2:1;
uint16_t :1;
uint16_t SIGN3:1;
uint16_t :1;
uint16_t SIGN4:1;
uint16_t :1;
uint16_t SIGN5:1;
uint16_t :1;
uint16_t SIGN6:1;
uint16_t :1;
uint16_t SIGN7:1;
} ADMOD0LBITS;

是沒有定義 uint16_t DIFF0:1; and uint16_t DIFF1:1;
那我要如何加這兩個定義?否則compilier會有redefine的問題!

typedef struct tagADMOD0LBITS {
uint16_t SIGN0:1;
uint16_t DIFF0:1;
uint16_t SIGN1:1;
uint16_t DIFF1:1;
uint16_t SIGN2:1;
uint16_t :1;
uint16_t SIGN3:1;
uint16_t :1;
uint16_t SIGN4:1;
uint16_t :1;
uint16_t SIGN5:1;
uint16_t :1;
uint16_t SIGN6:1;
uint16_t :1;
uint16_t SIGN7:1;
} ADMOD0LBITS;

thanks

發表於: 2020/5/14 11:19
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: dsp33ch的p33CH512MP508.h file不能更改
#2
版主
版主


查看用戶資訊
建議不要去修改 CH512MP508.h 的檔案,如有暫存器要加入建議自行建立一個 .h 檔。在程式裡 #include 該 h 檔即可。

發表於: 2020/5/8 12:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


dsp33ch的p33CH512MP508.h file不能更改
#1
新會員
新會員


查看用戶資訊
我要用dspic33ch的AD轉換,發現p33CH512MP508.h裡面有一些SFR並沒有定義,例如我在程式裡自己定義ADCORE0H資料結構,如下
#define ADCORE0H ADCORE0H
extern volatile uint16_t ADCORE0H __attribute__((__sfr__));
typedef struct tagADCORE0HBITS {
uint16_t ADCS:7;
uint16_t :1;
uint16_t RES:2;
uint16_t EISEL:3;
} ADCORE0HBITS;

extern volatile ADCORE0HBITS ADCORE0Hbits __attribute__((__sfr__));

/* ADCON1H */
#define _ADCS ADCORE0Hbits.ADCS
#define _RES ADCORE0Hbits.RES
#define _EISEL ADCORE0Hbits.EISEL

#define _ADCORE0H_ADCS_POSITION 0x00000000//BIT POSITION
#define _ADCORE0H_ADCS_MASK 0x0000007F//0111111
#define _ADCORE0H_ADCS_LENGTH 0x00000007//7 BIT

#define _ADCORE0H_RES_POSITION 0x00000008//7TH BIT
#define _ADCORE0H_RES_MASK 0x00000300//0011=8
#define _ADCORE0H_RES_LENGTH 0x00000002//2 BIT

#define _ADCORE0H_EISEL_POSITION 0x0000000A
#define _ADCORE0H_EISEL_MASK 0x00001C00//1 1100
#define _ADCORE0H_EISEL_LENGTH 0x00000003

但是 ADMOD0Lbits.DIFF0和ADMOD0Lbits.DIFF1在p33CH512MP508.h裡ADMOD0L沒有定義到,而我改好p33CH512MP508.h又存不了,請問我該如何克服這些問題?

另外,p33CH512MP508.inc裡也要一起改?

謝謝

發表於: 2020/5/7 20:07
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... ]

教育訓練中心

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