Programming instructions
91
While it is possible to use SET, RESET and the comparison instructions with
high speed counters, these instructions are scan dependent and limit the benefits
of high speed counters. To obtain full benefit, use the following high speed
instructions.
HSCS – High Speed Counter Set
This instruction functions like the standard SET instruction. When the counter
reaches a specified value, a bit is set. This instruction uses an interrupt and is
scan independent.
This instruction sets Y10 when the value of counter 255 equals 100.
HSCR – High Speed Counter Reset
This instruction functions like the standard RESET instruction. When the counter
reaches a specified value, a bit is reset. This instruction uses an interrupt and is
scan independent
This instruction resets Y10 when the value of counter 255 equals 200.
HSZ – High Speed Zone Compare
This instruction functions like the standard ZONE COMPARE instruction.
Depending on the count in relation to the range, one of 3 bits will turn on
This instruction sets:
Y10 when C251 <1000.
Y11 when 1000<= C251<=1200
Y12 when C251>1200
Notice that DHSCS, DHSCR, and DHSZ are used as the operation instead of
HSCS, HSCR, and HSZ. High speed counters are 32 bit devices, so it is
necessary to add the ‘D’ to the instruction to make it use 32 bit number.