參數(shù)資料
型號: R5F2L387CDFP
元件分類: 微控制器/微處理器
英文描述: 8-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP80
封裝: 12 X 12 MM, 0.50 MM PITCH, PLASTIC, LQFP-80
文件頁數(shù): 54/74頁
文件大小: 959K
代理商: R5F2L387CDFP
59
2588F–AVR–06/2013
ATtiny261/461/861
10.1.5
Digital Input Enable and Sleep Modes
As shown in Figure 10-2, the digital input signal can be clamped to ground at the input of the
schmitt-trigger. The signal denoted SLEEP in the figure, is set by the MCU Sleep Controller in
Power-down mode, Power-save mode, and Standby mode to avoid high power consumption if
some input signals are left floating, or have an analog signal level close to V
CC/2.
SLEEP is overridden for port pins enabled as external interrupt pins. If the external interrupt
request is not enabled, SLEEP is active also for these pins. SLEEP is also overridden by various
other alternate functions as described in “Alternate Port Functions” on page 60.
If a logic high level (“one”) is present on an asynchronous external interrupt pin configured as
“Interrupt on Rising Edge, Falling Edge, or Any Logic Change on Pin” while the external interrupt
is not enabled, the corresponding External Interrupt Flag will be set when resuming from the
above mentioned Sleep mode, as the clamping in these sleep mode produces the requested
logic change.
10.1.6
Unconnected Pins
If some pins are unused, it is recommended to ensure that these pins have a defined level. Even
though most of the digital inputs are disabled in the deep sleep modes as described above, float-
ing inputs should be avoided to reduce current consumption in all other modes where the digital
inputs are enabled (Reset, Active mode and Idle mode).
The simplest method to ensure a defined level of an unused pin, is to enable the internal pull-up.
In this case, the pull-up will be disabled during reset. If low power consumption during reset is
important, it is recommended to use an external pull-up or pulldown. Connecting unused pins
directly to V
CC or GND is not recommended, since this may cause excessive currents if the pin is
accidentally configured as an output.
10.1.7
Program Examples
The following code examples show how to set port B pins 0 and 1 high, 2 and 3 low, and define
the port pins from 4 to 5 as input with a pull-up assigned to port pin 4. The resulting pin values
are read back again, but as previously discussed, a nop instruction is included to be able to read
back the value recently assigned to some of the pins.
Note:
Two temporary registers are used to minimize the time from pull-ups are set on pins 0, 1 and 4,
until the direction bits are correctly set, defining bit 2 and 3 as low and redefining bits 0 and 1 as
strong high drivers.
Assembly Code Example
...
; Define pull-ups and set outputs high
; Define directions for port pins
ldi
r16,(1<<PB4)|(1<<PB1)|(1<<PB0)
ldi
r17,(1<<DDB3)|(1<<DDB2)|(1<<DDB1)|(1<<DDB0)
out
PORTB,r16
out
DDRB,r17
; Insert nop for synchronization
nop
; Read port pins
in
r16,PINB
...
相關(guān)PDF資料
PDF描述
R5F2L387CNFP 8-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP80
R5F2L368CDFP 8-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP64
R5F2L3AACDFA 8-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP100
R5F2L3ACCDFA 8-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP100
R5F2L38CCNFA 8-BIT, FLASH, 20 MHz, MICROCONTROLLER, PQFP80
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
R5F2L387CNFA#V0 制造商:Renesas Electronics Corporation 功能描述:IC MCU 16BIT 48KB FLASH
R5F2L387CNFP#30 制造商:Renesas Electronics Corporation 功能描述:R8C/L38C FL-48K, PLQP0080KB-A - Trays 制造商:Renesas Electronics Corporation 功能描述:IC MCU 16BIT 48KB FLASH 80LQFP
R5F2L387MDFA#V0 制造商:Renesas Electronics Corporation 功能描述:IC MCU 16BIT 48KB FLASH
R5F2L387MNFA#V0 制造商:Renesas Electronics Corporation 功能描述:R8C/L38M 48+4/6 80LQFP 14X14 -20 TO +85 - Trays 制造商:Renesas Electronics Corporation 功能描述:IC MCU 16BIT 48KB FLASH 80LQFP
R5F2L387MNFP#30 制造商:Renesas Electronics Corporation 功能描述:IC MCU 16BIT 48KB FLASH 80LQFP