Very interesting to read all this.
Think your problem is here:
$hwstack = 64
$swstack = 64
$framesize = 64
These settings are not copied to Proteus... Perhaps you can change them in Proteus and recompile your firmware. And check on the hardware....
Have fun
Ben Zijlstra
↧