iii
4.11 High Speed Counters........................................................................................4-22
4.11.1 Basic High Speed Counter Operation .....................................................................4-23
4.11.2 Availability of High Speed Counters .......................................................................4-24
4.11.3 1 Phase Counters - User Start and Reset (C235 - C240).......................................4-26
4.11.4 1 Phase Counters - Assigned Start and Reset (C241 to C245)..............................4-27
4.11.5 2 Phase Bi-directional Counters (C246 to C250) ....................................................4-28
4.11.6 A/B Phase Counters (C252 to C255) ......................................................................4-29
4.12 Data Registers...................................................................................................4-30
4.12.1 General Use Registers............................................................................................4-31
4.12.2 Battery Backed/ Latched Registers.........................................................................4-32
4.12.3 Special Diagnostic Registers...................................................................................4-32
4.12.4 File Registers ..........................................................................................................4-33
4.12.5 Externally Adjusted Registers .................................................................................4-34
4.13 Index Registers..................................................................................................4-35
4.13.1 Modifying a Constant...............................................................................................4-36
4.13.2 Misuse of the Modifiers ...........................................................................................4-36
4.13.3 Using Multiple Index Registers................................................................................4-36
4.14 Bits, Words, BCD and Hexadecimal..................................................................4-37
4.14.1 Bit Devices, Individual and Grouped .......................................................................4-37
4.14.2 Word Devices..........................................................................................................4-39
4.14.3 Interpreting Word Data............................................................................................4-39
4.14.4 Two’s Compliment...................................................................................................4-42
4.15 Floating Point And Scientific Notation ...............................................................4-43
4.15.1 Scientific Notation....................................................................................................4-44
4.15.2 Floating Point Format..............................................................................................4-45
4.15.3 Summary Of The Scientific Notation and Floating Point Numbers..........................4-46
5. Applied Instructions...............................................................................5-1
5.1 Program Flow-Functions 00 to 09 .......................................................................5-4
5.1.1 CJ (FNC 00) ..............................................................................................................5-5
5.1.2 CALL (FNC 01)..........................................................................................................5-7
5.1.3 SRET (FNC 02).........................................................................................................5-8
5.1.4 IRET, EI, DI (FNC 03, 04, 05) ...................................................................................5-9
5.1.5 FEND (FNC 06).......................................................................................................5-11
5.1.6 WDT (FNC 07) ........................................................................................................5-12
5.1.7 FOR, NEXT (FNC 08, 09) .......................................................................................5-13
5.2 Move And Compare - Functions 10 to 19..........................................................5-16
5.2.1 CMP (FNC 10).........................................................................................................5-17
5.2.2 ZCP (FNC 11) .........................................................................................................5-17
5.2.3 MOV (FNC 12) ........................................................................................................5-18
5.2.4 SMOV (FNC 13)......................................................................................................5-18
5.2.5 CML (FNC 14).........................................................................................................5-19
5.2.6 BMOV (FNC 15) .....................................................................................................5-20
5.2.7 FMOV (FNC 16) ......................................................................................................5-21
5.2.8 XCH (FNC 17).........................................................................................................5-21
5.2.9 BCD (FNC18)..........................................................................................................5-22
5.2.10 BIN (FNC 19)...........................................................................................................5-22
5.3 Arithmetic And Logical Operations - Functions 20 to 29 ...................................5-24
5.3.1 ADD (FNC 20).........................................................................................................5-25
5.3.2 SUB (FNC 21) ........................................................................................................5-26
5.3.3 MUL (FNC 22).........................................................................................................5-27
5.3.4 DIV (FNC 23)...........................................................................................................5-28
5.3.5 INC (FNC 24) .........................................................................................................5-29
5.3.6 DEC (FNC 24) ........................................................................................................5-29
5.3.7 WAND (FNC 26)......................................................................................................5-30
5.3.8 WOR (FNC 27)........................................................................................................5-30