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

PIC16F628A #int_RA Interrupt problem

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



Joined: 05 Dec 2009
Posts: 40

View user's profile Send private message

PIC16F628A #int_RA Interrupt problem
PostPosted: Thu Jan 20, 2011 1:07 pm     Reply with quote

hey guys
I'm having problem with #int_RA, I want an interrupt whenever any change occurs at port A. Here is my code
Code:

#include <16F628A.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES HS                       //High speed Osc (>4mhz)
#FUSES PUT                      //No Power Up Timer
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD                    //No EE protection

#use delay(clock=4MHz , internal)

#define test_led PIN_B0

#INT_RDA                     
void port_a_isr()
 {
 
  output_toggle(test_led);
 }
 
void main()
 {
  set_tris_b(0b00000000);
  set_tris_a(0b00000111);
  output_low(test_led);
 
  setup_comparator(NC_NC_NC_NC); 
  enable_interrupts(INT_RDA);
  enable_interrupts(GLOBAL);
 
  while(TRUE)     
   delay_ms(1000);
 }
 
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 20, 2011 1:38 pm     Reply with quote

Go to the webpage for the 16F628A and download the data sheet.
http://www.microchip.com/wwwproducts/devices.aspx?ddocname=en010210

Look in this section, which is in the "Special Features of the CPU" section.
Quote:
14.5 Interrupts

Do you see any interrupt-on-change for PortA listed ?


Download the CCS compiler manual.
http://www.ccsinfo.com/downloads/ccs_c_manual.pdf
Look in this section:
Quote:
#INT_xxxx

What does #INT_RDA do ?
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