Guest Guest Posted May 6, 2004 Report Posted May 6, 2004 THANKS FOR THE LAST SOLUTION BUT HOW CAN IN PUT C200 VALUE IN TO A DATA REGISTER. HAVE TRIED [MOV C200 D1] TAKE IT IM LOOK IN THE WRONG PLACE Quote
Crossbow Posted May 6, 2004 Report Posted May 6, 2004 I think if MOV won't work, ADD or SUB might... try ADD C200 K0 D1 and see if it allows that. Quote
JimRowell Posted May 6, 2004 Report Posted May 6, 2004 High Speed counters are 32 bit. Try using DMOV. Should do the trick for you. Quote
JimRowell Posted May 6, 2004 Report Posted May 6, 2004 I should warn you as well, that DMOV will use 2 locations as the destination because a location such as D1 is only 16 bits wide. So if you use [DMOV C200 D1] you will be moving the 32-bit value of the counter to D1 and D2. Make sure you are not using D2 for something else because it will get overwritten by the DMOV command. The low 16 bits will be stored in D1 and the high 16 bits will be in D2. If your counter's value is between -32768 and 32,767 (inclusive) then D2 will contain a zero. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.