Delta DVP-ES2 — 3.8 Detailed Instruction Explanation

3. Instruction Set API 82 Operands: S : Source device D : Destination device n : Number of nibbles to be converted ( n = 1~256) Explanations: 1. 16-bit conversion mode: When M1161 = OFF, the instruction converts every nibble of the Hex data in S into ASCII codes and send them to the higher 8 bits and lower 8 bits of D . n = the converted number of nibbles. 2. 8-bit conversion mode: When M1161 = ON, the instruction converts every nibble of the Hex data in S into ASCII codes and send them to the lower 8 bits of D . n = the number of converted nibbles. (All higher 8 bits of D = 0). 3. Flag: M1161 (8/16 bit mode switch) 4. Available range for Hex data: 0~9, A~F Program Example 1: 1.

M1161 = OFF, 16-bit conversion. 2. When X0 = ON, convert the 4 hex values (nibbles) in D10 into ASCII codes and send the result to registers starting from D20. M1001 M1161 X0 3. Assume: (D10) = 0123 H ‘0’ = 30H ‘4’ = 34H ‘8’ = 38H (D11) = 4567 H ‘1’ = 31H ‘5’ = 35H ‘9’ = 39H (D12) = 89AB H ‘2’ = 32H ‘6’ = 36H ‘A’ = 41H (D13) = CDEF H ‘3’ = 33H ‘7’ = 37H ‘B’ = 42H 4. When n = 4, the bit structure will be as: 3-245 Mnemonic Operands Function Controllers ASCI P Convert Hex to ASCII ES2/EX2 SS2 SA2 SX2 SE Type OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F ASCI, ASCIP:

7 steps S * * * * * * * * * D * * * * * * n * * 16-bit 32-bit SA2 SA2 SA2 SS2 SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 SE SE SE ASCI D10 D20 K4