mc68hc08ln56 Freescale Semiconductor, Inc, mc68hc08ln56 Datasheet - Page 169

no-image

mc68hc08ln56

Manufacturer Part Number
mc68hc08ln56
Description
M68hc08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
13.3 Port B
Port B is an 8-bit special function port that shares four of its pins with the A/D converter module.
13.3.1 Port B Data Register
The port B data register contains a data latch for each of the eight port pins.
PTB[7:0] — Port B Data Bits
ADI[3:0] — Analog-to-Digital Input Bits
Freescale Semiconductor
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.
ADI[3:0] are pins used for the input channels to the analog-to-digital converter module. The channel
select bits in the A/D status and control register define which port B pin will be used as an A/D input
and overrides any control from the port I/O logic by forcing that pin as the input to the analog circuitry.
Alternate Function:
Care must be taken when reading port B while applying analog voltages to
AD3:AD0 pins. If the appropriate A/D channel is not enabled, excessive
current drain may occur if analog voltages are applied to the PTBx/ANx pin,
while PTB is read as a digital input. Those ports not selected as analog
input channels are considered digital I/O ports.
NOTES:
1.X = don’t care
2.Hi-Z = high impedance
3.Writing affects data register, but does not affect input
DDRA Bit
MC68HC08LN56 • MC68HC708LN56 General Release Specification, Rev. 2.1
Reset:
$0001
Read:
0
1
Write:
PTB
PTB7
PTA Bit
Bit 7
X
X
(1)
Figure 13-5. Port B Data Register (PTB)
Table 13-2. Port A Pin Functions
PTB6
I/O Pin Mode
Input, Hi-Z
6
Output
PTB5
(2)
5
NOTE
Accesses to DDRA
Unaffected by reset
PTB4
Read/Write
DDRA[7:0]
DDRA[7:0]
4
PTB3
ADI3
3
PTA[7:0]
PTB2
ADI2
Read
Accesses to PTA
Pin
2
PTB1
PTA[7:0]
ADI1
PTA[7:0]
1
Write
(3)
PTB0
ADI0
Bit 0
Port B
169

Related parts for mc68hc08ln56