sinoteq
- 20th July 2006, 10:35
Hi,
I would like to have 2 different programs in the same PIC, one in the low part of the flash memory and the other one starting from the midle. Startup is always done in the first program and in very special cases we will jump to the second program. I have found I can move code by adding
ASM
ORG 50
ENDASM
in the begining of my code. Look at No I2C.gif
When I add I2C or similar functions from the PBP strange things starts. These functions ignore the ORG 50 statement and creates code between 0 and the area where I want to start. Why is this and how do I stop it?
It is possible to change the order so I always use the high program and jump to the low if that makes it easier to solve this problem.
Any ideas or input?
I would like to have 2 different programs in the same PIC, one in the low part of the flash memory and the other one starting from the midle. Startup is always done in the first program and in very special cases we will jump to the second program. I have found I can move code by adding
ASM
ORG 50
ENDASM
in the begining of my code. Look at No I2C.gif
When I add I2C or similar functions from the PBP strange things starts. These functions ignore the ORG 50 statement and creates code between 0 and the area where I want to start. Why is this and how do I stop it?
It is possible to change the order so I always use the high program and jump to the low if that makes it easier to solve this problem.
Any ideas or input?