PenneyInstruments

SCL Block confusion

5 posts in this topic

Hi,

I have been trying to scale a range of 0-999.9 to 0000-270F hex and I am having some difficulty. I have attached my .cxp file if anyone would so kindly take a look and see what I am doing wrong. Btw the first move instruction is just an arbitrary number for testing my conversion.

Forgot Drive At Home.cxp

Share this post


Link to post
Share on other sites

Wait, I just reread your post above.  9999 (as an integer UINT) = 270F (Hex).  No scaling is required, you just need to look at it as a HEX value.  Perhaps I am not understanding properly.

See the image below:

HexInt.jpg.4e2bcd5158cb01c6c2ae6ee6c0d07

I monitor D2000 (I just chose this address) as a HEX value and as an UINT (Unsigned Integer) value.  Note that the binary pattern shown is the same.  It is all in how the data is interpreted (as a HEX value or as an Unsigned INT value).

Share this post


Link to post
Share on other sites

I see that you are probably already aware of this fact from your other thread: 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now