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




Bookmarks