Omron Divide function without the remainder

M

Thread Starter

Mark

I have used the BCD DIV func on a c200hx as part of a FIFO subroutine. This utilises 50 different data memories which are indirectly addressed into the same DIV function. My problem is that after 1 complete cycle of the 50 inputs, 0000BCD is cascaded down the line of output DM, as DIV uses dm, dm+1 for the result. Is there a way to disable the dm+1.
 
N
Mark,
I suggest you re-write the subroutine to take care of the fact that the BCD DIV uses 2 dm locations so that the next time
through the subroutine, result number2 appears in dm+2 rather than dm+1. That way the 50 divisions use 50 dm locatios for the result and a further 50 for the remainders.
If you are writing the result of the 2nd division into the location occupied by the remainder of the first division, I don't see what your problem is because the 2nd result will over-write the first remainder, and you will end up with 50 contiguous results in 50 contiguous mem locations, but with the remainder of division number 50 in mem location dm+51. Maybe this is what your problem is...you need 51 dm locations and havnt allowed for that ? ! Please send me the relevant code if you wish.

Neil J <[email protected]>
New Zealand.
 
Thanks Neil, what you describe is exactly what is happening, reading my original mail doesnt really clarify the prob, The dm+1 holding the remainder is overwritten by the next DIV result; Its just that these op's are written to the touchscreen, and for 1 scan each shows the remainder of the previous! i got a bit of re-write to do!
 
N
Mark
Just re-write your touch screen routine to put up every 2nd dm, and that should do it ?
neil
 
Top