I am using MPLAB 7.10 and PicBasic Pro 2.46
Got some source code for us to look at?
On another note - you said you are using the 4620 to shift code out to another chip. Are you using the hardware SPI? If so, I've had nothing but trouble with that (nothing in the errata from Microchip). But I gave up on the hardware SPI and just wrote some code to 'bit-bang' the shifting for me. Fixed all my problems...
Last edited by skimask; - 7th February 2007 at 13:18.
I am using a bit bang shift out so that part is no problem. I have done some more investigation and this is what things looks like:
I have a working program and I add ONE new variable (Fire_Rate Var Byte), this code compiles to 5A7F and is working.
I change the variable to Word size (Fire_Rate Var Word) this code compiles to 5ABF. This is 64 bytes larger but that can be explained with the 64 bytes blocks used in the 18F flash. This code does not work.
If I change back to Byte size variable and use Define Reset ORG to trick the PIC into "making my program bigger" by adding 64 empty bytes in the begining the code compiles to 5ABF. This code is working.
I take it from this that the problem is not related to the program size but to the allocation of RAM. The Fire_Rate variable is not used at all in the sub that has the problem, but obviously it is related in some way, most likely because it is changing the RAM allocation and bank select.
I will look at the list file and see if I can come up with why and where things stops to work.
Mike
Do you have any BRANCH instructions which may need to be changed to BRANCHL ?
Keith
www.diyha.co.uk
www.kat5.tv
Nope. Only old useful Goto and GOSUB. By the way I can't see anything strange with the LST file.
Mike
Check to see if you have a GOSUB to any routine that doesn't issue a
RETURN to get back.
Thank you for all ideas but still no luck in fixing the problem. The program jumps to the sub but the sub makes some really strange things before it jumps back to where should. If I just remove the new variable or make it a Byte size things are working. I will see what happenes if I make 2 new byte size variables, that should be similar to making one word variable and using a word variable becomes crap.
Later.....
Mike
Bookmarks