View previous topic :: View next topic |
Author |
Message |
Pintarei
Joined: 24 Aug 2004 Posts: 3 Location: S. Orsola (TN), Italy
|
Can't get #build(reset=xxx, interrupt=xxx) to work right |
Posted: Tue Aug 24, 2004 4:39 am |
|
|
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
|
|
Posted: Tue Aug 24, 2004 8:51 pm |
|
|
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
|
|
Posted: Wed Aug 25, 2004 12:33 am |
|
|
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
|
|
Posted: Wed Aug 25, 2004 12:43 am |
|
|
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
|
|
Posted: Wed Aug 25, 2004 2:10 am |
|
|
.... as I was saying, I get lost in the simplest things... Thanks again. _________________ Keep things simple please! The world is already so complicated. |
|
|
|