CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Problem of #INT_RDA for PIC24FJ64GA004

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PhenixLin
Guest







Problem of #INT_RDA for PIC24FJ64GA004
PostPosted: Mon Oct 05, 2009 4:42 am     Reply with quote

Following codes work well at PIC24FJ64GA002, but it could not fire the interrupt #INT_RDA when I move it to PIC24FJ64GA004. Please help me verify the code.
Thanks.
Code:

#pin_select U2TX=PIN_C5
#pin_select U2RX=PIN_C4
#use rs232(UART2, baud=9600, stream=COM2, PARITY=N, BITS=8, STOP=1, ERRORS)

#INT_RDA
void UART0_isr()
{
   fputc(fgetc(COM2), COM2); 
}

void main()
{
   setup_wdt(WDT_OFF);
   setup_timer1(TMR_DISABLED);

   clear_interrupt(INT_RDA);
   enable_interrupts(INT_RDA);
   enable_interrupts(INTR_GLOBAL);

   while (1)
   ;
}


Below is the fuse setting:
Code:

#include <24FJ64GA004.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES NOJTAG                   //JTAG disabled
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOWRT                    //Program memory not write protected
#FUSES NODEBUG                  //No Debug mode for ICD
//#FUSES IOL1WAY                  //Allows only one reconfiguration of peripheral pins
#FUSES WINDIS                   //Watch Dog Timer in non-Window mode
#FUSES WPRES128                 //Watch Dog Timer PreScalar 1:128
#FUSES WPOSTS16                 //Watch Dog Timer PostScalar 1:32768
#FUSES IESO                     //Internal External Switch Over mode enabled
#FUSES NOCKSFSM                 //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NOOSCIO                  //OSC2 is general purpose output
#FUSES XT                     
#FUSES PR                     
#FUSES I2C1SELA             

#use delay(clock=11059200)


Complier version: 4.084

~ Phenix
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group