132 Programming Commands
NVRBIT Miscellaneous Command
ACTION: Store or return the bit value in NVR memory.
PROGRAM SYNTAX: NVRBIT(bit)= expression
NVRBIT(bit) - used in an expression
REMARKS: The bit value range is 1 - 65536. The expression must be a value of 0
or 1.
When using this command care must be taken not to alter elements used
by the NVR and NVRBYTE commands.
The NVR array is used for non-volatile storage. The array consist of
2048 elements, 8192 Bytes or 65536 Bits. Thus, there are 32 bits in
each word.
The bit assignments for each 32 bit word is as follows:
8 7 6 5 4 3 2 1 (Word Most Significant Byte)
16 15 14 13 12 11 10 9
24 23 22 21 20 19 18 17
32 31 30 29 28 27 26 25 (Word Least Significant Byte)
The array element (word) and bit number being addressed is calculated
as follows:
element number = ((int) (bit number + 31) / 32)
bit number = mod (bit number / 32)
EXAMPLES: NVRBIT(65505)=1 ' sets Bit 1 of element 2048 = 1
NVRBIT(65536)=0 ' sets Bit 32 of element 2048 = 0
Kommentare zu diesen Handbüchern