Freescale Semiconductor MCF51QE128RM manual Port D Data Direction Register Ptddd

Models: MCF51QE128RM

1 424
Download 424 pages 63.71 Kb
Page 127
Image 127

 

Chapter 6 Parallel Input/Output Control

 

Table 6-19. PTDD Register Field Descriptions

 

 

Field

Description

 

 

7–0

Port D Data Register Bits. For port D pins configured as inputs, reads return the logic level on the pin. For port

PTDDn

D pins configured as outputs, reads return the last value written to this register.

 

Writes are latched into all bits of this register. For port D pins configured as outputs, the logic level is driven out

 

the corresponding MCU pin.

 

Reset forces PTDD to all 0s, but these 0s are not driven out the corresponding pins because reset also configures

 

all port pins as high-impedance inputs with pull-ups/pull-downs disabled.

 

 

6.7.4.2Port D Data Direction Register (PTDDD)

R

W

Reset:

7

6

5

4

3

2

1

0

PTDDD7

PTDDD6

PTDDD5

PTDDD4

PTDDD3

PTDDD2

PTDDD1

PTDDD0

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

Figure 6-23. Port D Data Direction Register (PTDDD)

 

 

Table 6-20. PTDDD Register Field Descriptions

 

 

 

Field

 

Description

 

 

7–0

Data Direction for Port D Bits. These read/write bits control the direction of port D pins and what is read for PTDD

PTDDDn

reads.

 

0

Input (output driver disabled) and reads return the pin value.

 

1

Output driver enabled for port D bit n and PTDD reads return the contents of PTDDn.

 

 

 

6.7.4.3Port D Pull Enable Register (PTDPE)

The port D pull enable register enables pull-ups on the corresponding PTD pin. In some cases, a pull-down device is enabled if pull-downs are supported by an alternate pin function (e.g., KBI).

R

W

Reset:

7

6

5

4

3

2

1

0

PTDPE7

PTDPE6

PTDPE5

PTDPE4

PTDPE3

PTDPE2

PTDPE1

PTDPE0

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

Figure 6-24. Internal Pull Enable for Port D Register (PTDPE)

 

 

Table 6-21. PTDPE Register Field Descriptions

 

 

 

 

Field

Description

 

 

 

7–0

Internal Pull Enable for Port D Bits. Each of these control bits determines if the internal pull-up or pull-down device

PTDPEn

is enabled for the associated PTD pin. For port D pins configured as outputs, these bits have no effect and the

 

internal pull devices are disabled.

 

 

0 Internal pull-up/pull-down device disabled for port D bit n.

 

 

1 Internal pull-up/pull-down device enabled for port D bit n.

 

 

 

 

 

MCF51QE128 MCU Series Reference Manual, Rev. 3

 

 

 

 

Freescale Semiconductor

127

 

Get the latest version from freescale.com

 

Page 127
Image 127
Freescale Semiconductor MCF51QE128RM manual Port D Data Direction Register Ptddd, Port D Pull Enable Register Ptdpe