E556GB — 6.9 Programmable clock

Examples 6.9 Programmable clock Apart from the software timers there are also four 8-bit operands available which are incremented at set clock pulses. Operand addresses are PC00.00-PC00.03: The pulse markers are incremented by 1 in the range from 0 to 255 at the specified clock pulse. When the count reaches 255, the next clock cycle sets the operand back to 0. Application example One part of the program is to be processed only every 100 ms. L PC00.01 ; if 100 ms clock pulse memory is CMP BM03.14 ; the same as the old value?

JP= ; go to end of program 1 if yes = BM03.14 ; else new = old ″ ″ ″ ; this part of the program is processed ″ ; only every 100 ms ″ ″ ″ LN O01.03 ; program for 100 ms flash generator = O01.03 ″ ″ ″ ″ L PCxx.xx = changes the bit marker’s logical state every (128*clock pulse time) becau- se the status of bit 7 in the accumulator is used for bit processing. 120 Operand Clock pulse Range 10 ms 0...255 PC00.01 PC00.02 10 s