Hola, estoy probando el dsPIC30f2010 con un programa simple que es el parpadeo de un led, usando compilador xc16(demo) en el IDE MPLABX 2.1, la cual este programa se compila en el IDE sin ningun tipo de error, pero al momento de grabar en el software de PICKIT2 usando el grabador DELCOMP DPIC3; me sale este mensaje en la ventanita del PICKIT2:
some configuration words not in hex file
ensure default values above right are acceptable
Luego hago click en WRITE y me aparece el siguiente mensaje:
No device detected
Mi grabador les muestro en este enlace: http://www.actiweb.es/electronicaleonespinoza/archivo3.pdf
Mi grabador se comunica por usb y por ese medio intento grabar.
NOTA:1era vez que grabo un dspic con este grabador y por medio de USB, solo he utilizado este grabador para grabar en PIC16.
Saludos cordiales.
some configuration words not in hex file
ensure default values above right are acceptable
Luego hago click en WRITE y me aparece el siguiente mensaje:
No device detected
Mi grabador les muestro en este enlace: http://www.actiweb.es/electronicaleonespinoza/archivo3.pdf
Mi grabador se comunica por usb y por ese medio intento grabar.
NOTA:1era vez que grabo un dspic con este grabador y por medio de USB, solo he utilizado este grabador para grabar en PIC16.
Saludos cordiales.
Código:
ESTE es el codigo:
// DSPIC30F2010 Configuration Bit Settings
#define SYS_FREQ 80000000UL
#define FCY SYS_FREQ/4
#include <xc.h>
#include <libpic30.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
// FOSC
#pragma config FPR = XT_PLL8 // Primary Oscillator Mode (XT w/PLL 8x)
#pragma config FOS = PRI // Oscillator Source (Primary Oscillator)
#pragma config FCKSMEN = CSW_FSCM_OFF // Clock Switching and Monitor (Sw Disabled, Mon Disabled)
// FWDT
#pragma config FWPSB = WDTPSB_16 // WDT Prescaler B (1:16)
#pragma config FWPSA = WDTPSA_512 // WDT Prescaler A (1:512)
#pragma config WDT = WDT_OFF // Watchdog Timer (Disabled)
// FBORPOR
#pragma config FPWRT = PWRT_64 // POR Timer Value (64ms)
#pragma config BODENV = NONE // Brown Out Voltage (Reserved)
#pragma config BOREN = PBOR_OFF // PBOR Enable (Disabled)
#pragma config LPOL = PWMxL_ACT_HI // Low-side PWM Output Polarity (Active High)
#pragma config HPOL = PWMxH_ACT_HI // High-side PWM Output Polarity (Active High)
#pragma config PWMPIN = RST_IOPIN // PWM Output Pin Reset (Control with PORT/TRIS regs)
#pragma config MCLRE = MCLR_EN // Master Clear Enable (Enabled)
// FGS
#pragma config GWRP = GWRP_OFF // General Code Segment Write Protect (Disabled)
#pragma config GCP = CODE_PROT_OFF // General Segment Code Protection (Disabled)
// FICD
#pragma config ICS = PGD // Comm Channel Select (Use PGC/EMUC and PGD/EMUD)
int main(void)
{
OSCCONbits.POST0=0; //divisor de frecuencia desactivado FCY=(10Mhz*8)/4=20Mhz
OSCCONbits.POST1=0;
ADPCFG=0xFFFF; //puerto B como entrada digital
TRISBbits.TRISB0=0;
PORTBbits.RB0=0;
while(1)
{
PORTBbits.RB0=~PORTBbits.RB0;
__delay_ms(300);
}
return 0;
}
Última edición por un moderador: