
adccommunitymod (AutomationDirect) asked a question.
Accumulator loading??? Hex, decimal, etc.
Created Date: July 06,2016
Created By: TLaFleche
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I can't seem to find anything online about loading different number types into the accumulator for a DL06. The range under LD seems like it only accepts HEX values? (K0-FFFF) What about integers, binary, etc?
Created Date: July 06,2016
Created by: TLaFleche
I can't seem to find anything online about loading different number types into the accumulator for a DL06.
The range under LD seems like it only accepts HEX values? (K0-FFFF)
What about integers, binary, etc?
Created Date: July 06,2016
Created by: bcarlton
When loading a constant (K) the value is written as the hex value. If you intend a BCD value then there is no problem. However if you intend to load a 'binary ' value (AD's nomenclature) then you must determine the Hex format. A Real (floating point) number is loaded using the LDR command.
Created Date: July 06,2016
Created by: TLaFleche
Thanks for the help.
Im still confused with the binary. I'm trying to help another engineer here with programming in directsoft. He wants to know "how do i load a binary number (ex 1100110011001100) into the accumulator ". He isnt giving me an example of how he is getting this binary number into V memory in the first place.
Is there logic that can be done in directsoft that will even end up leaving you with a binary formatted number in a V memory Location?
And if that's the case, is there a way of implementing logic to convert the binary in that memory location into Hex outside of the accumulator?
Created Date: July 06,2016
Created by: scott.lawrence
you can use LD, BIN, OUT to get a binary number into V memory
Created Date: July 06,2016
Created by: TLaFleche
thanks scott.
Now is there a way to get that binary number back into the accumulator, or convert it to hex (as bcarlton mentioned)
Created Date: July 06,2016
Created by: plcnut
If the binary number is already in V-memory then LD will move it into the accumulator. If you want the binary from bit memory (Like C,X, or Y) then use LDF.
Created Date: July 06,2016
Created by: TLaFleche
perfect. thanks again folks
Created Date: July 06,2016
Created by: bcarlton
Using your example number - LD K6666 - again, the LD command loads a constant using Hex format only.
To clarify - using AD nomenclature - BCD, 'binary ' and Real are separate and different methods of storing numeric values in memory.
Hex, Octal and decimal are methods of showing that memory location contents to You. Showing BCD content is the same as showing Hex content. 'Binary ' as a display type shows the individual bits as 1's and 0's. Real numbers can be shown as a decimal point number or (for very large or very small numbers) usin expenentional notation.