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

What is the address from where the PIC begins execution ?

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



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

What is the address from where the PIC begins execution ?
PostPosted: Thu Dec 22, 2005 12:08 am     Reply with quote

Hi,

I read that the PIC mcu begins execution from 0 address of the Program Memory, is this correct ??

Is it possible to change this starting address to something using C commands ?? Also how would interrupt service routines be addressed, do ISR's have seperate pre-defined addresses of their own ??

thanks
arunb
kypec



Joined: 20 Sep 2003
Posts: 54

View user's profile Send private message

PostPosted: Thu Dec 22, 2005 12:29 am     Reply with quote

Yes, that is correct -> PIC always begins its program execution from address 0x0000 and ISR vectors are generally fixed at 0x0004 (PIC16) or 0x0008 (PIC18).
However, you can relocate your main() and ISR routines with use of the compiler directive
Code:
#build(reset=MY_OWN_RESET_ADDRESS,interrupt=MY_OWN_ISR_ADDRESS)

Try to search for the directive above on this forum and you will find plenty of hints and examples Wink
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