ATtiny85 Atmel Corporation, ATtiny85 Datasheet - Page 46

no-image

ATtiny85

Manufacturer Part Number
ATtiny85
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATtiny85

Flash (kbytes)
8 Kbytes
Pin Count
8
Max. Operating Frequency
20 MHz
Cpu
8-bit AVR
# Of Touch Channels
3
Hardware Qtouch Acquisition
No
Max I/o Pins
6
Ext Interrupts
6
Usb Speed
No
Usb Interface
No
Spi
1
Twi (i2c)
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
4
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
Yes
Crypto Engine
No
Sram (kbytes)
0.5
Eeprom (bytes)
512
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 85
I/o Supply Class
1.8 to 5.5
Operating Voltage (vcc)
1.8 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
2
Output Compare Channels
5
Pwm Channels
6
32khz Rtc
No
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATtiny85-15SZ
Manufacturer:
ATMEL
Quantity:
30
Part Number:
ATtiny85-20PU
Manufacturer:
CUI
Quantity:
1 000
Part Number:
ATtiny85-20SU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATtiny85V-10SH
Manufacturer:
Intel
Quantity:
62
Part Number:
ATtiny85V-10SU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
8.4.2
8.5
8.5.1
46
Register Description
ATtiny25/45/85
Code Example
MCUSR – MCU Status Register
The following code example shows one assembly and one C function for turning off the WDT.
The example assumes that interrupts are controlled (e.g., by disabling interrupts globally) so that
no interrupts will occur during execution of these functions.
Note:
The MCU Status Register provides information on which reset source caused an MCU Reset.
• Bits 7:4 – Res: Reserved Bits
These bits are reserved bits in the ATtiny25/45/85 and will always read as zero.
Bit
0x34
Read/Write
Initial Value
Assembly Code Example
C Code Example
WDT_off:
void WDT_off(void)
{
}
wdr
; Clear WDRF in MCUSR
ldi
out
; Write logical one to WDCE and WDE
; Keep old prescaler setting to prevent unintentional Watchdog Reset
in
ori r16, (1<<WDCE)|(1<<WDE)
out WDTCR, r16
; Turn off WDT
ldi r16, (0<<WDE)
out WDTCR, r16
ret
_WDR();
/* Clear WDRF in MCUSR */
MCUSR = 0x00
/* Write logical one to WDCE and WDE */
WDTCR |= (1<<WDCE) | (1<<WDE);
/* Turn off WDT */
WDTCR = 0x00;
1. See
r16, WDTCR
r16, (0<<WDRF)
MCUSR, r16
“Code Examples” on page
R
7
0
(1)
(1)
R
6
0
5
R
0
6.
R
4
0
WDRF
R/W
3
BORF
See Bit Description
R/W
2
EXTRF
R/W
1
PORF
R/W
0
2586N–AVR–04/11
MCUSR

Related parts for ATtiny85