|
MB95F613H Datasheet, PDF (68/110 Pages) Cypress Semiconductor – F2MC-8FX CPU core | |||
|
◁ |
PRELIMINARY
MB95610H Series
15.8.3 Port G registers
â Port G register functions
Register
abbreviation
Data
0
PDRG
1
0
DDRG
1
0
PULG
1
Read
Pin state is âLâ level.
Pin state is âHâ level.
Read by read-modify-write
(RMW) instruction
PDRG value is â0â.
PDRG value is â1â.
Port input enabled
Port output enabled
Pull-up disabled
Pull-up enabled
Write
As output port, outputs âLâ level.
As output port, outputs âHâ level.
â Correspondence between registers and pins for port G
Correspondence between related register bits and pins
Pin name
-
-
-
-
-
PG2
PG1
-
PDRG
DDRG
-
-
-
-
-
bit2
bit1
-
PULG
15.8.4 Port G operations
â Operation as an output port
â A pin becomes an output port if the bit in the DDRG register corresponding to that pin is set to â1â.
â For a pin shared with other peripheral functions, disable the output of such peripheral functions.
â When a pin is used as an output port, it outputs the value of the PDRG register to external pins.
â If data is written to the PDRG register, the value is stored in the output latch and is output to the pin set as an output port as it is.
â Reading the PDRG register returns the PDRG register value.
â Operation as an input port
â A pin becomes an input port if the bit in the DDRG register corresponding to that pin is set to â0â.
â For a pin shared with other peripheral functions, disable the output of such peripheral functions.
â If data is written to the PDRG register, the value is stored in the output latch but is not output to the pin set as an input port.
â Reading the PDRG register returns the pin value. However, if the read-modify-write (RMW) type of instruction is used to read the
PDRG register, the PDRG register value is returned.
â Operation as a peripheral function input pin
â To set a pin as an input port, set the bit in the DDRG register corresponding to the input pin of a peripheral function to â0â.
â Reading the PDRG register returns the pin value, regardless of whether the peripheral function uses that pin as its input pin.
However, if the read-modify-write (RMW) type of instruction is used to read the PDRG register, the PDRG register value is returned.
â Operation at reset
If the CPU is reset, all bits in the DDRG register are initialized to â0â and port input is enabled.
â Operation in stop mode and watch mode
â If the pin state setting bit in the standby control register (STBC:SPL) is set to â1â and the device transits to stop mode or watch
mode, the pin is compulsorily made to enter the high impedance state regardless of the DDRG register value. The input of that
pin is locked to âLâ level and blocked in order to prevent leaks due to input open.
â If the pin state setting bit is â0â, the state of the port I/O or that of the peripheral function I/O remains unchanged and the output
level is maintained.
â Operation of the pull-up register
Setting the bit in the PULG register to â1â makes the pull-up resistor be internally connected to the pin. When the pin output is âLâ level,
the pull-up resistor is disconnected regardless of the value of the PULG register.
Document Number: 002-04698 Rev. *A
Page 68 of 110
|
▷ |