User manual
29
65: A = Din.0
66: A = Din.1
67: A = Din.2
68: A = Din.3
69: A = AD1
6A: A = AD2
71 –7A: A = Expression 1–10
71: A = A + 1
72: A = A – 1
73: A = A + B
74: A = A – B
75: A = A * B
76: A = A / B
77: A = A And B
78: A = A Or B
79: A = A Xor B
7A: A = Not A
One example of using the variable A is found in the programme examples in chapter 3. The
programme was set at the address Zero here and slightly expanded. Additionally, there is a
defined start with the value 0 in the variable A. Address 01 contains a computing command,
here increase by 1. The content of the variables A is then handed over to the PWM-output and
the output port.
Address
Command
Data
Comment
00
4
0
A = 0
01
7
1
A = A + 1
02
5
4
Port = A
03
5
9
PWM = A
04
2
6
Wait for 100 ms
05
3
4
Jump –4
40 71 54 59 26 34
Listing 13: Increase by 1
Another example has already been shown in chapter 4. The data come from the analogue input
AD1 and are transferred to the output port and the PWM output. The modified programme
contains an additional computing step, i.e. inversion of the content of the variable A. This way
turns the value 0000 into the new value 1111, i.e. 0 becomes 15 and vice versa. The rising input
voltage thus leads to a reducing PWM-output.