MC68HC908AS60ACFN FREESCALE [Freescale Semiconductor, Inc], MC68HC908AS60ACFN Datasheet - Page 252

no-image

MC68HC908AS60ACFN

Manufacturer Part Number
MC68HC908AS60ACFN
Description
M68HC08 Microcontrollers
Manufacturer
FREESCALE [Freescale Semiconductor, Inc]
Datasheet
Input/Output Ports
22.3 Port B
Port B is an 8-bit special function port that shares all of its pins with the analog-to-digital converter.
22.3.1 Port B Data Register
The port B data register contains a data latch for each of the eight port B pins.
PTB[7:0] — Port B Data Bits
ATD[7:0] — ADC Channels
252
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.
PTB7/ATD7–PTB0/ATD0 are eight of the analog-to-digital converter 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 0 if the data direction for this bit is programmed as an input.
Otherwise, the data will reflect the value in the data latch. (See
(ADC)). 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 to the
states of the latches or 0.
Alternative
Functions:
Address:
Reset:
Read:
Write:
MC68HC908AZ60A • MC68HC908AS60A • MC68HC908AS60E Data Sheet, Rev. 6
$0001
PTB7
ATD7
Bit 7
Figure 22-5. Port B Data Register (PTB)
PTB6
ATD6
6
PTB5
ATD5
5
Unaffected by Reset
PTB4
ATD4
4
PTB3
ATD3
3
Chapter 26 Analog-to-Digital Converter
ATD2
PTB2
2
ATD1
PTB1
1
Freescale Semiconductor
ATD0
PTB0
Bit 0

Related parts for MC68HC908AS60ACFN