Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20610

BASCOM-AVR : how to assembled a three bye array in one data type : REPLY

$
0
0
I am happy as I was trying to show you how to use the overlay tool in Bascom but this is only the first step. Now we have the binary value it has to be put into a signed 32 bit binary number this is a single that will give us the decimal point so as I wrote you use the long to get the 24 bits which I overlay the 4 bytes you then rearrange the 4 bytes so that the order is correct with the first byte all "0"s if its positive or all "1"s if its negative then as you only have 24 bits and Bascom does not have a 24bit variable. You then have the single = the long. dim Wantedval as single wantedval = the long we have overlayed Now we perform calculations using the single that contains the whole value Regards Paul

Viewing all articles
Browse latest Browse all 20610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>