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

poblem with rda interupt ...

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







poblem with rda interupt ...
PostPosted: Fri Jun 02, 2006 8:34 pm     Reply with quote

hi all,
i've a probleme with a rda interupt


Code:

#include <16F876.h>

#use delay (clock=20000000)
#fuses HS, NOWDT, NOPROTECT, PUT, BROWNOUT, NOLVP
#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7,parity=n,bits=8)
#int_global

char a;

#int_rda
void int_reception(void)
{
static char c;

// Read char from USART.
c = getc();

// Send char back to the PC.
putc(c);
}


void main(void)
{
   SET_TRIS_a(0b00000010);
   SET_TRIS_a(0);
   set_tris_c(0b10000000);
//   PORT_C=0x00;
   // Enable the USART receive interrupt.
   enable_interrupts(INT_RDA);
   enable_interrupts(GLOBAL);
printf("start");

   for(;;)
   {
      if (a)
      {
         OUTPUT_HIGH(PIN_A0);
         a=0;
      }
      else
      {
         OUTPUT_LOW(PIN_A0);
         a=1;
      }
      if (INPUT(PIN_B1))
         OUTPUT_HIGH(PIN_B2);
      else
         OUTPUT_LOW(PIN_B2);   
      delay_ms(100);   

   }   
}




if someone can help me ..... thx ;)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jun 02, 2006 9:00 pm     Reply with quote

Try the program that I've posted in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=27156
Guest








PostPosted: Sat Jun 03, 2006 6:34 am     Reply with quote

thx PCM programmer for ur help Smile

it's ok Smile
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