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

PIC16F876A and INT_RDA problem

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







PIC16F876A and INT_RDA problem
PostPosted: Wed Jun 25, 2003 1:26 pm     Reply with quote

We were using 16F873 the following code was working ok. but when we upgrade to 16F876a by using CCS compiler version 3.16 the INT_RDA becomes not working. Please advise.

My simple code is:
#include <16f876a.h>
#include <string.h>
#include <stdlib.h>
#use delay(clock=3686400)
#use rs232(baud=9600,xmit=PIN_c6,rcv=PIN_c7)

#int_rda
void serial_isr(){
char ch;
disable_interrupts(global);
ch=getc();
printf("rec ok");
delay_ms(1000);
putc(ch);
enable_interrupts(global);
}

main(){
set_tris_c(0x80);
enable_interrupts(global);
enable_interrupts(int_rda);
while (1) {}

}
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515566
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: PIC16F876A and INT_RDA problem
PostPosted: Wed Jun 25, 2003 1:58 pm     Reply with quote

:=We were using 16F873 the following code was working ok. but when we upgrade to 16F876a by using CCS compiler version 3.16 the INT_RDA becomes not working. Please advise.
-------------------------------------------------------

You didn't show your #fuses statement, and that could
be part of the problem.

You're doing several things in your #int_rda function
that are not good.

Instead of using your program, try the one shown in this post.
<a href="http://www.pic-c.com/forum/general/posts/13774.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/13774.html</a>
Change the PIC to 16F877A, change the clock speed to 3686400,
and also change the oscillator type in the #fuses statement
from HS to XT. But don't change anything else. Then try it.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515568
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