Yes, if you declare, for example, 5 bits PBP will stuff them into a single byte compared to occupying 5 bytes if declared as such. Obviously if you only have one bit it doesn't matter, it would still need to be stored somewhere and the only available size inside the PIC is a byte.also does defining a bit instead of byte as a variable save active ram space
Many times you can reuse variables, you may have variables that are only used in certain sections of the code and each time you enter that section the value of those variables are recalculated so it doesn't matter if you overrwrite them / re-use them in other sections. If it gets REALLY tight you can use unused hardware registers of the PIC as storage locations, if you're not using TMR0 you can use that to store a BYTE - for example.
You could always post the code here and someone might come up with some good advice.
/Henrik.
Bookmarks