ZyXEL Communications omni TA128 User Manual page 144

Hide thumbs Also See for omni TA128:
Table of Contents

Advertisement

O O note: The values used in the example below differ from the actual
values in the S-register and are used for demonstration purposes
only.
Read the value from S38 using ATS38?
Convert it to binary, using the following weight table:
Bit
Binary value
0
00000001
1
00000010
2
00000100
3
00001000
4
00010000
5
00100000
6
01000000
7
10000000
To set bit 3 to 1 (binary), do a logic OR operation with the value.
Operation Example-1
OR
To set bit 3 to 0 (binary), you must invert the value using a logic
NOT operation and then do an logic AND operation.
NOT
00001000 8
11110111 247 $F7 11110111 247 $F7
AND
10001000 136 $88 01000000 64
10000000 128 $80 01000000 64
Finally, using the result decimal value, issue an ATS38=n to set
the register.
132
Decimal value Hexadecimal value
Binary
Dec. Hex Binary
10001000 136
00001000 8
10001000 136
1
2
4
8
16
32
64
128
Example-2
$88
01000000
$08
00001000
$88
01001000
$08 00001000 8
$01
$02
$04
$08
$10
$20
$40
$80
Dec.
64
8
72
$08
$40
$40
Hex.
$40
$08
$48

Advertisement

Table of Contents
loading

Table of Contents