IDEC MicroSmart User Manual

Page 286

Advertising
background image

17: U

SER

C

OMMUNICATION

I

NSTRUCTIONS

17-8

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

Example:

The following example shows two methods to enter 3-byte ASCII data “1” (31h), “2” (32h), “3” (33h).

(1) Constant (Character)

(2) Constant (Hexadecimal)

Designating Data Register as S1

When a data register is designated as source operand S1, conversion type and transmit digits must also be designated. The
data stored in the designated data register is converted and a designated quantity of digits of the resultant data is transmit-
ted. Conversion types are available in Binary to ASCII, BCD to ASCII, and no conversion.

When repeat is designated, data of data registers as many as the repeat cycles are transmitted, starting with the designated
data register. Repeat cycles can be up to 99.

Conversion Type

The transmit data is converted according to the designated conversion type as described below:

Example: D10 stores 000Ch (12)

(1) Binary to ASCII conversion

(2) BCD to ASCII conversion

(3) No conversion

000Ch

D10

Binar y to ASCII conversion

“0”

(30h)

“0”

(30h)

“0”

(30h)

“C”

(43h)

When transmitting 4 digits

ASCII data

000Ch

D10

Decimal value

“0”

(30h)

“0”

(30h)

“0”

(30h)

“1”

(31h)

When transmitting 5 digits

00012

BCD to ASCII conversion

“2”

(32h)

ASCII data

000Ch

D10

No conversion

NUL

(00h)

FF

(0Ch)

When transmitting 2 digits

ASCII data

Advertising