17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

82 ASCI P Convert Hex to ASCII<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

SE<br />

<strong>SX2</strong><br />

Type Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F ASCI, ASCIP: 7 steps<br />

S * * * * * * * * *<br />

D * * * * * *<br />

n * *<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Operands:<br />

S: Source device D: Destination device n: Number of nibbles to be converted (n = 1~256)<br />

Explanations:<br />

1. 16-bit conversion mode: When M1161 = OFF, the instruction converts every nibble of the Hex<br />

data in S into ASCII codes and send them to the higher 8 bits and lower 8 bits of D. n = the<br />

converted number of nibbles.<br />

2. 8-bit conversion mode: When M1161 = ON, the instruction converts every nibble of the Hex<br />

data in S into ASCII codes and send them to the lower 8 bits of D. n = the number of converted<br />

nibbles. (All higher 8 bits of D = 0).<br />

3. Flag: M1161 (8/16 bit mode switch)<br />

4. Available range for Hex data: 0~9, A~F<br />

Program Example 1:<br />

1. M1161 = OFF, 16-bit conversion.<br />

2. When X0 = ON, convert the 4 hex values (nibbles) in D10 into ASCII codes and send the result<br />

to registers starting from D20.<br />

M1001<br />

X0<br />

M1161<br />

ASCI D10 D20 K4<br />

3. Assume:<br />

(D10) = 0123 H ‘0’ = 30H ‘4’ = 34H ‘8’ = 38H<br />

(D11) = 4567 H ‘1’ = 31H ‘5’ = 35H ‘9’ = 39H<br />

(D12) = 89AB H ‘2’ = 32H ‘6’ = 36H ‘A’ = 41H<br />

(D13) = CDEF H ‘3’ = 33H ‘7’ = 37H ‘B’ = 42H<br />

3-227

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!