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

Can't get #build(reset=xxx, interrupt=xxx) to work right

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



Joined: 24 Aug 2004
Posts: 3
Location: S. Orsola (TN), Italy

View user's profile Send private message Visit poster's website

Can't get #build(reset=xxx, interrupt=xxx) to work right
PostPosted: Tue Aug 24, 2004 4:39 am     Reply with quote

Sad I've built a bootloader myself (a looong one) on the 18f8720 and it's located from 0000 to 0x47F. I've tried #build(reset=0x480 , interrupt=0x488) but the compiler comes back with: Attempted to create: 00000-0023F for #org,

any ideas?
Thanks!
_________________
Keep things simple please! The world is already so complicated.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 24, 2004 8:51 pm     Reply with quote

You didn't post a test program, so I made a little one.

It doesn't give me an error with PCH vs. 3.188.

Code:
#include <18F8720.H>
#fuses XT, NOPROTECT, PUT, NOBROWNOUT, NOWDT, NOLVP
#use delay(clock=4000000)
//#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

#build(reset=0x480 , interrupt=0x488)

#org 0x1000, 0x1FFF
//=================================
void main()
{


while(1);
}
Pintarei



Joined: 24 Aug 2004
Posts: 3
Location: S. Orsola (TN), Italy

View user's profile Send private message Visit poster's website

PostPosted: Wed Aug 25, 2004 12:33 am     Reply with quote

Embarassed

THANK you for your reply! I'm sorry, I found where my mistake was.... embarrasing! When it comes to code complicated time critical routines, it comes right immediatly... when it comes up to simple things (like getting an #org in the right place) I waste time. Thanks anyway PCM.
By the way, I've seen the peice of program you sent my for example... and set the clock of the 18f8720 to 40MHz, was that just an example or do you use it at 40MHz. I've read somewhere not to use it over 25MHz, Is that true?
Ciao.
_________________
Keep things simple please! The world is already so complicated.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 25, 2004 12:43 am     Reply with quote

The #use delay() line in my post has 6 zeros. That's 4 MHz.
Yes, it was just for an example.
Pintarei



Joined: 24 Aug 2004
Posts: 3
Location: S. Orsola (TN), Italy

View user's profile Send private message Visit poster's website

PostPosted: Wed Aug 25, 2004 2:10 am     Reply with quote

.... as I was saying, I get lost in the simplest things... Thanks again.
_________________
Keep things simple please! The world is already so complicated.
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