Freescale Semiconductor MC68HC08KH12 Manual de usuario Pagina 194

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 262
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 193
Advance Information MC68HC(7)08KH12Rev. 1.1
194 Freescale Semiconductor
DDRD[7:0] — Data Direction Register D Bits
These read/write bits control port D data direction. Reset clears
DDRD[7:0], configuring all port D pins as inputs.
1 = Corresponding port D pin configured as output
0 = Corresponding port D pin configured as input
NOTE: Avoid glitches on port D pins by writing to the port D data register before
changing data direction register D bits from 0 to 1.
Figure 12-12 shows the port D I/O logic.
Figure 12-12. Port D I/O Circuit
When bit DDRDx is a logic one, reading address $0003 reads the PTDx
data latch. When bit DDRDx is a logic zero, reading address $0003
reads the voltage level on the pin. The data latch can always be written,
regardless of the state of its data direction bit. Table 12-5 summarizes
the operation of the port D pins.
Address: $0007
Bit 7654321Bit 0
Read:
DDRD7 DDRD6 DDRD5 DDRD4 DDRD3 DDRD2 DDRD1 DDRD0
Write:
Reset:00000000
Figure 12-11. Data Direction Register D (DDRD)
READ DDRD ($0007)
WRITE DDRD ($0007)
RESET
WRITE PTD ($0003)
READ PTD ($0003)
PTDx
DDRDx
PTDx
INTERNAL DATA BUS
Vista de pagina 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 261 262

Comentarios a estos manuales

Sin comentarios