參數(shù)資料
型號: MC68HC08LT8
廠商: 飛思卡爾半導(dǎo)體(中國)有限公司
英文描述: Microcontrollers
中文描述: 微控制器
文件頁數(shù): 99/156頁
文件大?。?/td> 1030K
代理商: MC68HC08LT8
Port B
MC68HC08LT8 Data Sheet, Rev. 1
Freescale Semiconductor
99
9.3.2 Data Direction Register B (DDRB)
Data direction register B determines whether each port B pin is an input or an output. Writing a logic 1 to
a DDRB bit enables the output buffer for the corresponding port B pin; a logic 0 disables the output buffer.
NOTE
For devices packaged in a 44-pin package, PTB6–PTB7 are not connected.
DDRB6:7 should be set to a 1 to configure PTB6–PTB7 as outputs.
DDRB[7:6, 3:0] — Data Direction Register B Bits
These read/write bits control port B data direction. Reset clears DDRB[7:6, 3:0], configuring all port B
pins as inputs.
1 = Corresponding port B pin configured as output
0 = Corresponding port B pin configured as input
NOTE
Avoid glitches on port B pins by writing to the port B data register before
changing data direction register B bits from 0 to 1.
Figure 9-7
shows the port
B I/O logic.
Figure 9-7. Port B I/O Circuit
When DDRBx is a logic 1, reading address $0001 reads the PTBx data latch. When DDRBx is a logic 0,
reading address $0001 reads the voltage level on the pin. The data latch can always be written,
regardless of the state of its data direction bit.
Table 9-3
summarizes the operation of the port B pins.
Address:
$0005
Bit 7
6
5
4
3
2
1
Bit 0
Read:
DDRB7
DDRB6
0
0
DDRB3
DDRB2
DDRB1
DDRB0
Write:
Reset:
0
0
0
0
0
0
0
0
Figure 9-6. Data Direction Register B (DDRB)
READ DDRB ($0005)
WRITE DDRB ($0005)
RESET
WRITE PTB ($0001)
READ PTB ($0001)
PTBX
DDRBX
PTBX
I
相關(guān)PDF資料
PDF描述
MC68HC08SR12 M68HC08 Microcontrollers
MC68HC11E0 HC11 Microcontrollers
MC68HC11K0 HCMOS Microcontroller Unit
MC68HC11KMNPEVS Microcontrollers
MC68HC705C8AC Microcontrollers
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MC68HC08LT8CFGE 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:Microcontrollers
MC68HC08MR4 制造商:MOTOROLA 制造商全稱:Motorola, Inc 功能描述:In-Circuit Simulator
MC68HC08P4 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS MICROCONTROLLER UNIT
MC68HC08QT1 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:M68HC08 Microcontrollers
MC68HC08QT2 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:M68HC08 Microcontrollers