Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problem with importing hex file to pickit2 and dsPIC respond in an UART tool

Status
Not open for further replies.

khansaab21

Advanced Member level 4
Joined
Apr 12, 2008
Messages
108
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,298
Activity points
2,214
I am using dsPIC30F3010 with mplab IDE and pickit2 (lite) as programmer and UART tool. I have written a simple code for serial communication. The hex file is built well and good.
Importing the hex in pickit2 IDE generates an error the "some of the configuration words are missing, using the default values". But any how, the hex file gets loaded and the programmer downloads the program in chip. Programming is always successful.
Then I open the UART tool, click on the check box of vdd to provide vdd from pickit 2. Establish the baud rate and hit connect button.

Following are the questions
1. What does this error means "some of the configuration words are missing, using the default values"??
2. Why doesnt dspic30f3010 respond in the uart tool?? It is supposed to transmit the received character but it is not. Following is the code. It couldnt get more simpler than this


// A program for testing seial communication only (In software loop-back mode)
// Files to be included
#include <p30f3010.h>

// Device configuration settings
_FOSC(CSW_FSCM_OFF & XT_PLL16); // External oscillator with PLL - 16
_FWDT(WDT_OFF); // Watch dog timer is off
_FBORPOR(PBOR_ON & BORV_20 & PWRT_64 & MCLR_EN); // Master reset is enabled

void SetupPeripherals(void); // Prototype for initializing functions
void __attribute__((__interrupt__)) _U1RXInterrupt(void);

char rece;

int main ( void ) // Start of main program
{
SetupPeripherals();
while(1);
return 0;
}

void __attribute__((__interrupt__,auto_psv)) _U1RXInterrupt(void)
{
rece = U1RXREG; // Copying the reception into a variable
U1TXREG = rece; // Sending back the received byte
IFS0bits.U1RXIF = 0; // Clearing the interrupt flag
}

void SetupPeripherals(void) // Function for initializing peripherals
{
// ============= UART Receive ======================
// Enabling UART module
U1BRG = 0x005F; //Baud rate: 19200
U1STAbits.UTXEN = 1; // Enabling transmitter
U1MODEbits.UARTEN = 1; // Enabling UART module

// Enabling UART receive interrupt
IEC0bits.U1RXIE = 1; // Enabling UART receive interrupt
// UART receive interrupt has a by-default level 4 priority
IFS0bits.U1RXIF = 0; // Clearing the interrupt flag
}
 

Re: dspic with mplab

Issue is resolved. There was error in sequence of initiating the UART module.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top