PhenixLin Guest
|
Problem of #INT_RDA for PIC24FJ64GA004 |
Posted: Mon Oct 05, 2009 4:42 am |
|
|
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 |
|