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

PIC 18F2620

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



Joined: 21 Feb 2012
Posts: 5

View user's profile Send private message

PIC 18F2620
PostPosted: Tue Feb 21, 2012 6:17 am     Reply with quote

Hey bin neu hier,

Habe ein Problem will mit CCs Compiler einen Interrupt auf dem pic18f2620 programmieren und weiss nicht wie ich das machen kann :S

kann mir hier jemand helfen ?

-------------------------------------------------------------------------------------

I got a Problem, I want so create a Interrupt routine on the pic 18f2620 and I don't know how to handle this problem :S

Is there anyone who can help me ?

lg clon
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

Interrupts
PostPosted: Tue Feb 21, 2012 7:53 am     Reply with quote

There are several interrupt programs in the CCS manual, and in the example folder. Those in the example folder are usually complete and compilable.

Mike
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Tue Feb 21, 2012 3:08 pm     Reply with quote

Quote:

create a Interrupt routine


a lot depends on WHICH interrupt you want to use.

there are quite a few in that particular PIC -

which ONE are you interested in ??
RoGuE_StreaK



Joined: 02 Feb 2010
Posts: 73

View user's profile Send private message

PostPosted: Tue Feb 21, 2012 4:48 pm     Reply with quote

I currently use the exact same chip, you may find something of use in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=43174
it was trouble-shooting an interrupt from Timer0. There's a stripped-down version of the code about 2/3 of the way down the page, which may be a starting point for you.

Running a 20MHz crystal, using
setup_timer_0(RTCC_INTERNAL|RTCC_8_bit|RTCC_DIV_1);
gives an interrupt of 102.4us

setup_timer_0(RTCC_INTERNAL|RTCC_8_bit|RTCC_DIV_2);
gives an interrupt of 51.2us

... and so on.
clon



Joined: 21 Feb 2012
Posts: 5

View user's profile Send private message

PostPosted: Wed Feb 22, 2012 2:18 am     Reply with quote

asmboy wrote:
Quote:

create a Interrupt routine


a lot depends on WHICH interrupt you want to use.

there are quite a few in that particular PIC -

which ONE are you interested in ??


I want to get an interrupt if I send something over my RS 232 Smile what kind of interrupt will be the best choice for this reason ?
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

RS232 Interrupts
PostPosted: Wed Feb 22, 2012 5:10 am     Reply with quote

The CCS example EX_SISR.C shows you how to do it.

You WILL have to change the "#include <18F452.h>" line to "#include <18F2620.h>" or your chosen processor if different.

You MAY need to change the "#use delay(clock=20000000)" to suit.

The program is complete and compilable.

Best wishes

Mike
clon



Joined: 21 Feb 2012
Posts: 5

View user's profile Send private message

Re: RS232 Interrupts
PostPosted: Fri Feb 24, 2012 7:17 am     Reply with quote

Mike Walne wrote:
The CCS example EX_SISR.C shows you how to do it.

You WILL have to change the "#include <18F452.h>" line to "#include <18F2620.h>" or your chosen processor if different.

You MAY need to change the "#use delay(clock=20000000)" to suit.

The program is complete and compilable.

Best wishes

Mike


Thank you for this hint :D I manage it to run this file now Smile now I have to run this file in a existed project how do I include this :S ?

Clon
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Fri Feb 24, 2012 9:46 am     Reply with quote

Depends on what you are trying to do.

You are asking "How long is a piece of string?".

Give us some clues and we may be able to help.

Mike
clon



Joined: 21 Feb 2012
Posts: 5

View user's profile Send private message

PostPosted: Thu Mar 08, 2012 5:11 am     Reply with quote

My problem is that if there is an interrupt my program doesn't go into the isr. :S
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Thu Mar 08, 2012 8:51 am     Reply with quote

post the code you are having trouble with
and help may become possible
clon



Joined: 21 Feb 2012
Posts: 5

View user's profile Send private message

PostPosted: Fri Mar 09, 2012 6:16 am     Reply with quote

I throw all my interrupt idees away haha ... I want to create a polling system so I got a new problem i don't know how to read the buffer date out of my pic16F2620 :S
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