PDA

View Full Version : Serial code placement



nirvdrum
- 9th January 2007, 04:58
Hi,

It appears that when using HSEROUT or a similar statement that the compiler injects a bunch of code to set up the serial port starting at address 0x0000. Is there any way to configure where this code goes? I'd really like to have this location reserved for my own program.

FWIW, I'm using a 16f88.

Thanks,
Kevin

mister_e
- 9th January 2007, 05:46
While i personnaly don't see any advantages, the question is... WHY?

nirvdrum
- 9th January 2007, 16:57
As you're probably aware from other recent threads, I'm working on a bootloader. For this, it's helpful to have control over what's going where. With the compiler throwing in code wherever, it's sorta messed with that control. I'm certainly able to cope with it in other ways, it was just an unexpected surprise when I got error messages about conflicts with code locations I had @ ORG'd.

Bruce
- 9th January 2007, 19:58
If you use DEFINE LOADER_USED 1, it will force PBP to start dropping code
at 0x04h, but it will always insert a GOTO INIT at 0x00h. The boot-loader
software normally just re maps this GOTO to a location after its own jump
vector.

If you're using LCDOUT or I2C, PBP will also insert CLRF FLAGS just before the
GOTO INIT, so that's something else to watch out for.