[quote:4e89ce276d]I am able to collect one register of one old metering chip ADE7753 it is a 24 bit signed value,
I am storing it in three byt array.
1- My question is how I can assembled it in one data type , say small, double I am not sure which data type???
[/quote:4e89ce276d]
Store the received value in a Long variable "Num24" (MSByte will be always 0).
Then convert it to a regular signed Long "Result".
[code:1:4e89ce276d]Dim Num24 As Long ' 24-bit two's complement
Dim Result As Long ' (signed) long
Do
If Num24.23 = 0 Then
Result = Num24
Else
Result = Num24 - 16777216
End If[/code:1:4e89ce276d]
↧