English
Language : 

MC68HC08AZ16 Datasheet, PDF (326/527 Pages) Motorola, Inc – HCMOS Microcontroller Unit
I/O Ports
Port B
Port B
Port B is an 8-bit special function port that shares all of its pins with the
analog to digital convertor.
Port B data register The port B data register contains a data latch for each of the eight port
(PTB)
B pins.
PTB
$0001
Read:
Write:
Reset:
ALTERNATE
FUNCTIONS
Bit 7
6
5
4
3
2
PTB7 PTB6 PTB5 PTB4 PTB3 PTB2
Unaffected by reset
ATD7 ATD6 ATD5 ATD4 ATD3 ATD2
Figure 4. Port B data register (PTB)
1
PTB1
ATD1
Bit 0
PTB0
ATD0
PTB[7:0] — Port B data bits
These read/write bits are software programmable. Data direction of
each port B pin is under the control of the corresponding bit in data
direction register B. Reset has no effect on port B data.
ATD[7:0] — ADC channels
NOTE:
PTB7/ATD7- PTB0/ATD0 are eight analog to digital convertor channels.
The ADC channel select bits, CH[4:0], determine whether the
PTB7/ATD7- PTB0/ATD0 pins are ADC channels or general-purpose
I/O pins. If an ADC channel is selected and a read of this corresponding
bit in the port B data register occurs, the data will be zero if the data
direction for this bit is programmed as an input. Otherwise, the data will
reflect the value in the data latch. Data direction register B (DDRB) does
not affect the data direction of port B pins that are being used by the
ADC. However, the DDRB bits always determine whether reading port B
returns the states of the latches or logic 0.
5-io
MOTOROLA
I/O Ports
MC68HC08AZ32
325