..I am using c++ to write the .c source to enable it to run in mplab/....so i got to configure the usart and then compile the usart then after compilation..when i trying to run and program it to the pic18f252 board..there is error msg pop up..[ICD0083: Target not in debug mode, unable to perform operation]..can you help?this is my program in mplad..
#include <p18f252.h>
#include <usart.h>
#include <usart.h>
void main(void)
{
// configure USART
OpenUSART( USART_TX_INT_OFF &
USART_RX_INT_OFF & //usart configuration
USART_ASYNCH_MODE &
USART_EIGHT_BIT &
USART_CONT_RX &
USART_BRGH_HIGH,25 );
putcUSART(0x0D); //hex number for enter
while(1)
{
PORTA=1; //PORTA and TRISA input configuration
TRISA=255;
PORTB=0; //PORTB and TRISB output configuration
TRISB=0;
PORTC=1; //PORTC and TRISC input configuration
TRISC=255;
if(PORTA==0) //no input
{
PORTA=0;
//TRISB=0x00 //no LED light up
}
else if(PORTA==1)
{
PORTA=1;
//TRISB=PORTA //takes input from port A
}
else if(PORTA==2)
{
PORTA=2; //pushbutton pressed
}
else if(PORTA==3)
{
PORTA=3;
}
else if(PORTA==4)
{
PORTA=4;
}
else if(PORTA==5)
{
PORTA=5;
}
else if(PORTA==6)
{
PORTA=6;
}
else if(PORTA==7)
{
PORTA=7;
}
else if(PORTA==8)
{
PORTA=8;
}
}
}