I had difficulty using function pointers. Perhaps I should have been aware of this but I learned the hard way.
if preprocessor #device *=16 is in your source all variables that index or alter a pointer in any way must also be declared as long or int16. I was trying to index my function pointers with an 8 bit flag because there are only twenty functions. It worked great if the functions were in the same page as the calling func. when the flag is declared as a long variable it works. Even though the upper 8 bits are always zero's. Hope this can prevent some frustration for others.
Guest Guest
Posted: Tue Feb 24, 2004 9:47 am
Im, the #device *=16 instruction is only to be able to access more than 256 bytes in ram..
8bits pointers can point 0-255 byte in ram...
16bits can point 0-65535
RKnapp
Joined: 23 Feb 2004 Posts: 51
16-bit pointer note
Posted: Tue Feb 24, 2004 12:23 pm
Wait -- please explain. I'm a newbie using 18F8720 and know I'll need a lot more than 256 bytes of RAM -- I'm trying to compress a giant DOS app to fit into this chip.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum