1 binary data, Binary data -21 – ElmoMC SimplIQ Software Manual User Manual
Page 83
SimplIQ
Software Manual
Program Development and Execution
MAN-SIMSW (Ver. 1.4)
6-21
After a successful download, global variables can be used — for monitoring and
modifications — from an external terminal such as the Composer Smart Terminal.
6.5.1
Binary Data
The
SimplIQ
drive flash memory is interfaced with binary data. Sending the binary data on
the RS-232 lines is problematic, because they do not differentiate between data and
delimiters.
Characters that are problematic for sending on RS-232 lines are:
All numbers from 128 to 255
All possible terminators: 0,
Equals sign (=)
Backspace
In order to prevent this problem, a hexadecimal binary format is used during data upload
and download, although this increases the amount of data to be transmitted.
Every byte in hexadecimal format consists of two numbers (such as 0x12), considered to be a
single character. For example, the 8-bit number 0x12 in hexadecimal binary format is the
sequence of two characters: 1 and 2.
The representation of numbers in the DSP flash memory differs from its representation
inside a personal computer.
The 8-bit number is represented the same way.
The 16-bit number, represented in hexadecimal format as equal to 0x1234, is represented
in the DSP memory in the following two bytes:
Byte 1 equals the value 0x12 in hexadecimal form
Byte 2 equals the value 0x34 in hexadecimal form
The 32-bit number, represented in hexadecimal format as equal to 0x12345678, is
represented in the DSP memory in the following four bytes:
Byte 1 equals the value 0x56 in hexadecimal form
Byte 2 equals the value 0x78 in hexadecimal form
Byte 3 equals the value 0x12 in hexadecimal form
Byte 4 equals the value 0x34 in hexadecimal form
Binary data to be loaded to the serial flash is represented in this format.
Examples:
Number in Hexadecimal
Form in PC
Sequence of Characters in Hex
Binary Form for Transmission
0x12 12
0x1234 1234
0x12345678 56781234