Toshiba – Toshiba TMP87CP24AF User Manual

Page 60

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

Advertising
background image

TOSHIBA

TMP87CM24A/P24A

2.2.7 Ports P6 (P67 to P60) Port P7 (P77 to P70) Port P8 (P87 to P80) Port P9 (P93 to P90)

Port P

6

, P7, P

8

and P9 are an

8

-bit input/output ports and are also used as the segment output port.

Input/output mode or segement output mode is specified by the corresponding bit in the Px port control

register (PxCR). During reset, PxCR is initialized to "0", which configure port Px as input/output. Port Px

output latches are also initialized to "1". PxCR can only be written.

When a read instruction is executed for port P9, bits 7 to 4 read in as indefinite.

Note: x = 6,7,8,9

Example: Setting the upper 2 bits of port P

6

as a segment output port, and the others as

input/output port.

LD

(P

6

CR), 11000000B

P6

(0006

h

)

R/W

P6CR

(0029

h

)

P7

(0007

h

)

R/W

P7CR

(002A

h

)

P8

(0008

h

)

R/W

P8CR

(002B

h

)

P9

(0009

h

)

R/W

P9CR

(002C

h

)

P67

SEG16

P66

SEG17

P65

SEG18

P64

SEG19

P63

SEG20

P62

SEG21

P61

SEG22

P60

SEG23

1

0

(Initial value:

1111 1111)

(Initial value:

0000 0000)

P6CR

Port P6/

segment output select

0: Port P6 mode

1: Segment output mode

1

0

P77

SEG24

P76

SEG25

P75

SEG26

P74

SEG27

P73

SEG28

P72

SEG29

P71

SEG30

P70

SEG31

1

0

(Initial value:

1111 1111)

(Initial value:

0000 0000)

P7CR

Port P7/

segment output select

0: Port P7 mode

1: Segment output mode

1

0

P87

SEG32

P86

SEG33

P85

SEG34

P84

SEG35

P83

SEG36

P82

SEG37

P81

SEG38

P80

SEG39

1

0

(Initial value:

1111 1111)

(Initial value:

0000 0000)

P8CR

Port P8/

segment output select

0: Port P8 mode

1: Segment output mode

1

0

P93

SEG12

P92

SEG13

P91

SEG14

P90

SEG15

1

0

(Initial value:

1111 1111)

(Initial value:

0000 0000)

Figure 2-9. Port P

6

, P7, P

8

, P9

Write-

only

Write-

only

Write-

only

P9CR

Port P9/

0: Port P9 mode

Write-

segment output select

1: Segment output mode

only

3

-

24-60

2002

-

10-03

Advertising
This manual is related to the following products: