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 CCS Technical Support

The serial port is unable to receive data with the interrupt

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 26, 2008 1:00 pm     Reply with quote

Try a more a more simple test program, as shown below.

I don't have 18F2550, but I do have an 18F4550. I don't have a 24 MHz
oscillator, but I do have a 25 MHz "can" oscillator. You didn't show your
fuses (the bootloader fuses), so I used the ones shown below. I tested
this program with vs. 4.057 on a PicDem2-Plus board. It worked OK.

If it doesn't work, I suspect some hardware problem. It could be
a missing MCLR pullup resistor (10K for ICD2, or 47K for ICD-U40),
or some of the Vdd and Vss pins may not be connected to the power
supply, or something wrong with the oscillator circuit. I also strongly
suspect the bootloader fuses are in "LVP" mode, or have the wrong
oscillator setting.
Code:
#include <18F4550.h>
#fuses EC_IO, NOWDT, PUT, BROWNOUT, NOLVP
#use delay(clock=25000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)


#int_rda
void rx_isr()
{
char c;

c = getc();
putc(c);

}

//==========================
void main()
{
enable_interrupts(INT_RDA);
enable_interrupts(GLOBAL);

while(1);
}
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