datasheetbank_Logo
データシート検索エンジンとフリーデータシート

NJU3502L データシートの表示(PDF) - Japan Radio Corporation

部品番号
コンポーネント説明
一致するリスト
NJU3502L
JRC
Japan Radio Corporation  JRC
NJU3502L Datasheet PDF : 42 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
NJU3502
PROGRAMMABLE INPUT/OUTPUT PORT CONTROL REGISTER(PHY12)
Programmable Input / Output Port Control Register(PHY12) is a peripheral register to set the
programmable input/output PORT(PORTB) as either the input or the output. All bits in PORTB are set as
the output when LSB(b0) of PHY12 is set to “1”. All bits in PORTB are set as the input when “b1” of
PHY12 set to “0”.
PORTB is set as the input in accordance with the state of PHY12 which is set to “0” on the “RESET”
operation.
[READING PORTB Input / Output Port Control Register(PHY12)]
(MSB) 3
2
1
0 (LSB)
PHY12 “0”
“0”
“0”
PORTB input/output state
(0:input, 1:output)
[WRITING PORTB Input / Output Port Control Register(PHY12)]
(MSB) 3
2
1
0 (LSB)
PHY12
PORTB input/output setting
(0:input, 1:output)
(2) PROGRAMMABLE INPUT/OUTPUT PORT OPERATION
a. The output operation example
PB0 and PB1 of PORTB output “H”, and PB2 and PB3 of PORTB output “L”.
:
SRPC
;
LDI Y,7
;PHY7 is pointed
LDI A,%0011
;"0011" is stored into Accumulator
TAP
;Data in Accumulator is transmitted to PHY7
; (PORTB output register)
LDI Y,12
LDI A,%0001
TAP
;PHY12 is pointed
;"0001" is stored into Accumulator
;Data in Accumulator is transmitted to PHY12
PORTB
set as the output
:
b. The input operation example
Accumulator gets the input data from PORTB.
:
SRPC
;
LDI Y,12
LDI A,%0000
TAP
;PHY12 is pointed
;"0000" is stored into Accumulator
;Data in Accumulator is transferred to PHY12
PORTB
set as the input
LDI Y,7
;PHY7 is pointed
TPA
;The input data from PHY7 is transferred to Accumulator
:
The signal from PB0 terminal is stored into the LSB of Accumulator, the signal from PB1 terminal is stored
into the b1 of Accumulator, the signal from PB2 terminal is stored into the b2 of Accumulator, and the signal
from PB3 terminal is stored into the b3 of Accumulator.
- 14 -

Share Link: 

datasheetbank.com [ Privacy Policy ] [ Request Datasheet ] [ Contact Us ]