• 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: DSpic33FJ256GP710 PWM問題(新)
#9
版主
版主


查看用戶資訊
其實 ANSI C 基本都是ㄧ樣的,沒有說你會了 C18 ,那 C30 或 TI 的 C 就看不懂吧! 所以這是基礎功,必須一步一步的鍊。

W401 講的是 C 的基礎,其他的RTC課程都是以週邊的應用為主。沒有 C 的基礎要看這些RTC教材是恨辛苦的,有很多的宣告與敘述會不知所云的。

Master 張大大,
所介紹的都是好書,只是"日文看不懂" ... 而已。
有沒有同好想寫本 PIC24 的書? Microchip Taiwan 將全力支援,而且現在PIC24也很工程師 & 學校在使用,應該有他的市場存在的利機。

發表於: 2008/8/4 8:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: DSpic33FJ256GP710 PWM問題(新)
#8
資深會員
資深會員


查看用戶資訊
C30的部分,曾百由老師有出相關的書。可以去看看。

不過我是覺得這本寫的比較好。

電子制御・信号処理のための dsPIC活用ガイドブック
後閑 哲也 (著)

發表於: 2008/8/3 20:07
不要問我哪裡來,我只是個流浪天涯的工程師
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: DSpic33FJ256GP710 PWM問題(新)
#7
新會員
新會員


查看用戶資訊
我的板子用的是C30 可是你推薦的課程是C18,他們差異不大嗎?

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


Re: DSpic33FJ256GP710 PWM問題(新)
#6
版主
版主


查看用戶資訊
到 Microchip 上 W401 C18 的基礎課程。右邊教育訓練有上課資料。

發表於: 2008/8/1 9:48
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: DSpic33FJ256GP710 PWM問題(新)
#5
新會員
新會員


查看用戶資訊
小的知了~先去研究c

發表於: 2008/7/31 0:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: DSpic33FJ256GP710 PWM問題(新)
#4
資深會員
資深會員


查看用戶資訊
參照:

ga040795 寫道:
可以說詳細一點嗎.....我c的基礎很糟糕..麻煩你了!!


這不叫「c的基礎很糟糕」,而是完全不懂C語言。

隨便找本C語言入門書看一下。很多基本功得靠你自己去學。
若連一個C語言該有的基礎都不知道,其他人也很難幫到你....

發表於: 2008/7/30 21:36
不要問我哪裡來,我只是個流浪天涯的工程師
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: DSpic33FJ256GP710 PWM問題(新)
#3
新會員
新會員


查看用戶資訊
可以說詳細一點嗎.....我c的基礎很糟糕..麻煩你了!!

發表於: 2008/7/30 21:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: DSpic33FJ256GP710 PWM問題(新)
#2
版主
版主


查看用戶資訊
C 程式裡沒有 main( ) 函數叫啟動模組 crt0.o 去哪裡開始執行?

發表於: 2008/7/30 8:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


DSpic33FJ256GP710 PWM問題(新)
#1
新會員
新會員


查看用戶資訊
以下是我PWM Output Compare的程式:請各位幫我看看哪有問題,小弟剛摸不久,所以問題可能有點蠢!我是按照他當初給的範例程式去模仿需要加入的部份(.c .h .gld),所以可能整體上會有問題,output compare 是參照講義貼上來的,後面都有說明


主程式:main.c

#include "p33FJ256GP710.h"

Init_pwm();


副程式:pwm.c

void Init_pwm(void)

OC1CONbits.OCM = 0b000; // Turn off Output Compare 1 Module
OC1R = 0x0026; // Initialize Compare Register1 with 0x0026
OC1RS = 0x0026; // Initialize Secondary Compare Register1 with 0x0026
OC1CONbits.OCM = 0b110; // Load new compare mode to OC1CON
PR2 = 0x004C; // Initialize PR2 with 0x004C
IPC1bits.T2IP = 1; // Setup Output Compare 1 interrupt for
IFS0bits.T2IF = 0; // Clear Output Compare 1 interrupt flag
IEC0bits.T2IE = 1; // Enable Output Compare 1 interrupts
T2CONbits.TON = 1; // Start Timer2 with assumed settings
// Example code for Timer2 ISR:
void __attribute__ ((__interrupt__)) _T2Interrupt(void)
{
IFS0bits.T2IF = 0;
}

另外還加入p33FJ256GP710.h 及 p33FJ256GP710.gld 但是我去build 都是Build Failed
以下是我Build的訊息:

Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\test\main_rtc.o".
Clean: Deleted file "C:\test\pwm.o".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP710 -x c -c "main_rtc.c" -o"main_rtc.o" -g -Wall
main_rtc.c:48: warning: type defaults to 'int' in declaration of 'Init_pwm'
main_rtc.c:48: warning: data definition has no type or storage class
Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP710 -x c -c "pwm.c" -o"pwm.o" -g -Wall
pwm.c: In function '_T2Interrupt':
pwm.c:63: warning: PSV model not specified for '_T2Interrupt';
assuming 'auto_psv' this may affect latency
Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP710 "main_rtc.o" "pwm.o" -o"pwm.cof" -Wl,-L"C:\Program Files\Microchip\MPLAB C30\lib",--script="C:\test\p33FJ256GP710.gld",-Map="pwm.map",--report-mem

Program Memory Usage

section address length (PC units) length (bytes) (dec)
------- ------- ----------------- --------------------
.reset 0 0x4 0x6 (6)
.ivt 0x4 0xfc 0x17a (378)
.aivt 0x104 0xfc 0x17a (378)
.text 0x200 0xce 0x135 (309)
.dinit 0x2ce 0x2 0x3 (3)
.isr 0x2d0 0x2 0x3 (3)

Total program memory used (bytes): 0x435 (1077) <1%


Data Memory Usage

section address alignment gaps total length (dec)
------- ------- -------------- -------------------

Total data memory used (bytes): 0 (0)


Dynamic Memory Usage

region address maximum length (dec)
------ ------- ---------------------
heap 0 0 (0)
stack 0x800 0x7800 (30720)

Maximum dynamic memory (bytes): 0x7800 (30720)

c:/program files/microchip/mplab c30/bin/../lib\libpic30-coff.a(crt0.o)(.init+0xc):../support/inc/p30f2010.inc: undefined reference to `main'
c:/program files/microchip/mplab c30/bin/../lib\libpic30-coff.a(crt0.o)(.init+0xe):../support/inc/p30f2010.inc: undefined reference to `main'
Link step failed.
BUILD FAILED: Tue Jul 29 21:22:33 2008


以上就是我Build失敗的訊息,小弟在這邊感謝你看完這麼一大堆的訊息
最後我附上我PWM程式!!

Attach file:


Link only for registered users

發表於: 2008/7/30 0:40
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... ]

教育訓練中心

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