• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::

論壇索引


Board index » All Posts (dark)




給MPLAB C18 3.37.01無法安裝的方法
資深會員
資深會員



發表於: 2011/2/19 19:27
頂部


PIC32無法在MPLAB中使用WATCH功能?
資深會員
資深會員


在下因為要使用ENC424J600的網路晶片,因此搭配了PIC32MX460F512L的晶片,使用Microchip所提供的Demo code,但是要進入看watch時發現無法開啟該功能,因此無法看到實際IP狀態,所以想請問看看是不是PIC32無法使用MPLAB 中的WATCH功能?

發表於: 2009/9/25 9:52
頂部


Re: dsPIC33FJ256MC710 PORT輸出的問題
資深會員
資深會員


這是我的程式設定

#include <p33FJ256MC710.h>

#if defined(__dsPIC33F__)
_FOSCSEL(FNOSC_FRC);            // Internal FRC oscillator
_FOSC(FCKSM_CSECMD OSCIOFNC_OFF  POSCMD_NONE);  
                
// Clock Switching is enabled and Fail Safe Clock Monitor is disabled
                // OSC2 Pin Function: OSC2 is Clock Output
                // Primary Oscillator Mode: XT Crystanl
_FWDT(FWDTEN_OFF WINDIS_OFF );

#define GetSystemClock()        (80000000ul)      // Hz
#define PLL                38
#define GetInstructionClock()    (GetSystemClock()/2)
#define GetPeripheralClock()    GetInstructionClock()
#define Fcy     GetInstructionClock()
#define FCY        GetInstructionClock()
#define BAUD_RATE       (115200)
#define BaudRate (Fcy/(16*BAUD_RATE))-1
#include <stdio.h>
#include <libpic30.h>

void InitClock(void) {
    
PLLFBD PLL;    // M = 40
    
CLKDIVbits.PLLPOST 0;    // N1 = 2
    
CLKDIVbits.PLLPRE 0;    // N2 = 2
    
OSCTUN 0;
    
CLKDIVbits.DOZE=0;
    
RCONbits.SWDTEN 0;
// Clock switch to incorporate PLL
    
__builtin_write_OSCCONH(0x01);    // Initiate Clock Switch to 
    // FRC with PLL (NOSC=0b001)
    
__builtin_write_OSCCONL(0x01);        // Start clock switching
    
while (OSCCONbits.COSC != 0b001);    // Wait for Clock switch to occur    

    
while(OSCCONbits.LOCK != 1) {};
}

void initial_set(void){
    
ODCA 0;
    
TRISAbits.TRISA6 0;
    
__C30_UART=2;
    
U2BRG BaudRate;
    
U2MODEbits.UARTEN 1;
}

int main(void){
    
InitClock();
    
initial_set();
    
printf("nr開始準備接收資料");
    while(
1){
    
asm volatile("bset PORTA,#1");    
    
asm volatile("bclr PORTA,#1");
}

OSCCON 經ICD3看到
NOSC = 0x01;
COSC= 0x01;
PLLPOST =0;
PLLPRE =0;
DOZE = 0;

InitClock這段是從範例程式直接擷取下來的
Uart2的輸出是正常顯示 並無亂碼
在示波器下看的 _RA1的H/L頻率最高是1MHz(當PLLFBD 設定為43的時候)

因為FIN=7.38Mhz
所以設定為 Fcy = (1/2)((7.38*38)/(2*2)) 所以得到大約為40MPIS的值。

但因為從示波器上看到切換頻率最多只能到1Mhz 所以一直覺得很奇怪。

因為看起來我程式設定上應該沒有錯,但是IO速度就是沒辦法超過,故來問之。

發表於: 2009/6/19 18:04
頂部


dsPIC33FJ256MC710 PORT輸出的問題
資深會員
資深會員


因為最近有用到dsPIC33FJ系列,想試著來跑SW SPI,但是後來發現IO速度好像挺慢的,因此用示波器看,發現真不快,因此試著用組合讓它單純跑H/L 狀態,發現最多只能跑到1Mhz左右的速度,因此想請問看看,dsPIC33FJ的IO速度真的只能到這樣嗎? 有辦法能讓它的輸出速度變快嗎?

測試環境:

FRC PLL /FOSC 80Mhz/Fcy 40MIPs

使用C30來測試。

發表於: 2009/6/19 9:42
頂部



« 1 ... 21 22 23 (24) 25 »



:::

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

教育訓練中心

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