__PARAMCNT or __PARAMn value corrupted on user defined function
slcott
Posts: 27
I am trying to use my micromega fpu. My hardware is setup and I have established communication with the fpu. Unfortunately, I have a problem using either a subroutine or a function to write to the fpu inside of my main loop. It seems that either my __PARAMn values or __PARAMCNT gets corrupted somehow because my sx fpu function leaves out the ARG and only passes an OPCODE to the FPU. Has anyone had experience with user defined functions going haywire like this.
Post Edited (slcott) : 12/30/2009 1:44:59 AM GMT
Post Edited (slcott) : 12/30/2009 1:44:59 AM GMT
Comments
It looks like you ARE copying them to other variables, so it should work.
If you could post the whole program we could help more.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropBASIC home page www.propbasic.com
·
In the above, the line "if tmpcnt < 3 then FPU_Write2" will NOT call the function, it will GOTO the function, then return, without executing following code. You may want to break some of your code into very small testable piece and make sure each piece is OK before working the pieces into a larger program.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php