beautypg.com

Sharp Z-336J User Manual

Page 105

background image

9-28

Chapter 9: Message transfers

9

The current value monitor of the timers/counters (COM = 23

(H)

)

[Format]

COM

= 23

(H)

TADR

L, H

= Timer and counter number (0000

(H)

to 03FF

(H)

)

See page 9-21.

L

L, H

= Number of data to read

DATA

1 to N

= The current value data (read current value field of the timer and the counter)

ATTR

1 to N

= The attribute data of the timer and the counter

[Function]
- Reads the current values and the attributes of the timers/counters identified by the starting number

TADR and the number of data L.

- Up to 256 timers/counters can be read at a time.
- The current value data is read from the timer/counter's current range (b0000 to xxxxx ).
- The attributes are as shown below :

[Execution condition]
- Write enable mode

: Mode 0, mode 1 and mode 2

- PC operation status

: Stopping, operating

[Example]
- Reads the current values of TMR0000 and TMR0001.

00

(H)

01

(H)

02

(H)

04

(H)

08

(H)

09

(H)

0A

(H)

0B

(H)

0C

(H)

0D

(H)

0E

(H)

0F

(H)

Not in use

MD

CNT

TMR

DTMR(BCD)

DTMR(BIN)

UTMR(BCD)

UTMR(BIN)

DCNT(BCD)

DCNT(BIN)

UCNT(BCD)

UCNT(BIN)

Ë

Command

Ë

Response

COM TADR

L

TADR

H

L

L

L

H

COM

RSLT TADR

L

TADR

H

L

L

L

H

DATA

1

......

......

DATA

N

ATTR

1

ATTR

N

Number of data

Ë

Command

Ë

Response

DTMR

(BCD)

UTMR

(BCD)

23

00

00

02

00

23

00

00

00

02

00

34

92

78

D6

08

0A

Top number of

the timer and

the counter

Top number of

the timer and

the counter

Number of data

The current

value of

TMR0000

1234

The current

value of

TMR0001

5678

This manual is related to the following products: