Rainbow-electronics ATtiny12 Manual de usuario Pagina 1

Busca en linea o descarga Manual de usuario para Sensores Rainbow-electronics ATtiny12. Rainbow Electronics ATtiny12 User Manual Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 86
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 0
1
Features
Utilizes the AVR
®
RISC Architecture
High-performance and Low-power 8-bit RISC Architecture
90 Powerful Instructions – Most Single Clock Cycle Execution
32 x 8 General Purpose Working Registers
Up to 8 MIPS Throughput at 8 MHz
Nonvolatile Program and Data Memory
1K Byte of Flash Program Memory
In-System Programmable (ATtiny12)
Endurance: 1,000 Write/Erase Cycles (ATtiny11/12)
64 Bytes of In-System Programmable EEPROM Data Memory for ATtiny12
Endurance: 100,000 Write/Erase Cycles
Programming Lock for Flash Program and EEPROM Data Security
Peripheral Features
Interrupt and Wake-up on Pin Change
One 8-bit Timer/Counter with Separate Prescaler
On-chip Analog Comparator
Programmable Watchdog Timer with On-chip Oscillator
Special Microcontroller Features
Low-power Idle and Power-down Modes
External and Internal Interrupt Sources
In-System Programmable via SPI Port (ATtiny12)
Enhanced Power-on Reset Circuit (ATtiny12)
Internal Calibrated RC Oscillator (ATtiny12)
Specification
Low-power, High-speed CMOS Process Technology
Fully Static Operation
Power Consumption at 4 MHz, 3V, 25°C
Active: 2.2 mA
Idle Mode: 0.5 mA
Power-down Mode: <1 µA
Packages
8-pin PDIP and SOIC
Operating Voltages
1.8 - 5.5V for ATtiny12V-1
2.7 - 5.5V for ATtiny11L-2 and ATtiny12L-4
4.0 - 5.5V for ATtiny11-6 and ATtiny12-8
Speed Grades
0 - 1.2 MHz (ATtiny12V-1)
0 - 2 MHz (ATtiny11L-2)
0 - 4 MHz (ATtiny12L-4)
0 - 6 MHz (ATtiny11-6)
0 - 8 MHz (ATtiny12-8)
Pin Configuration
1
2
3
4
8
7
6
5
(RESET) PB5
(XTAL1) PB3
(XTAL2) PB4
GND
VCC
PB2 (T0)
PB1 (INT0/AIN1)
PB0 (AIN0)
ATtiny11
PDIP/SOIC
1
2
3
4
8
7
6
5
(RESET) PB5
(XTAL1) PB3
(XTAL2) PB4
GND
VCC
PB2 (SCK/T0)
PB1 (MISO/INT0/AIN1)
PB0 (MOSI/AIN0)
ATtiny12
PDIP/SOIC
8-bit
Microcontroller
with 1K Byte
Flash
ATtiny11
ATtiny12
Rev. 1006C09/01
Vista de pagina 0
1 2 3 4 5 6 ... 85 86

Indice de contenidos

Pagina 1 - Pin Configuration

1Features• Utilizes the AVR® RISC Architecture• High-performance and Low-power 8-bit RISC Architecture– 90 Powerful Instructions – Most Single Clock C

Pagina 2

10ATtiny11/121006C–09/01OR and all other operations between two registers or on a single register apply to theentire register file.Registers 30 and 31

Pagina 3

11ATtiny11/121006C–09/01Register Indirect Figure 9. Indirect Register AddressingThe register accessed is the one pointed to by the Z-register (R31, R

Pagina 4

12ATtiny11/121006C–09/01Relative Program Addressing, RJMP and RCALLFigure 12. Relative Program Memory AddressingProgram execution continues at addres

Pagina 5

13ATtiny11/121006C–09/01EEPROM Data Memory The ATtiny12 contains 64 bytes of data EEPROM memory. It is organized as a separatedata space, in which sin

Pagina 6

14ATtiny11/121006C–09/01I/O Memory The I/O space definition of the ATtiny11/12 is shown in the following table:Note: Reserved and unused locations are

Pagina 7

15ATtiny11/121006C–09/01pendent of the individual interrupt enable settings. The I-bit is cleared by hardware afteran interrupt has occurred, and is s

Pagina 8

16ATtiny11/121006C–09/01The most typical and general program setup for the reset and interrupt vector addressesfor the ATtiny11 are:Address Labels Cod

Pagina 9

17ATtiny11/121006C–09/01Reset Sources The ATtiny11/12 provides three or four sources of reset:• Power-on Reset. The MCU is reset when the supply volta

Pagina 10 - ATtiny11/12

18ATtiny11/121006C–09/01Power-on Reset for the ATtiny11A Power-on Reset (POR) circuit ensures that the device is reset from power-on. Asshown in Figur

Pagina 11

19ATtiny11/121006C–09/01Figure 17. Reset Logic for the ATtiny12Note: 1. The Power-on Reset will not work unless the supply voltage has been below VPO

Pagina 12

2ATtiny11/121006C–09/01Description The ATtiny11/12 is a low-power CMOS 8-bit microcontroller based on the AVR RISCarchitecture. By executing powerful

Pagina 13

20ATtiny11/121006C–09/01Note: 1. Due to the limited number of clock cycles in the start-up period, it is recommendedthat Ceramic Resonator be used.Thi

Pagina 14

21ATtiny11/121006C–09/01Power-on Reset for the ATtiny12A Power-on Reset (POR) pulse is generated by an on-chip detection circuit. The detec-tion level

Pagina 15

22ATtiny11/121006C–09/01Figure 20. External Reset during OperationBrown-out Detection (ATtiny12)ATtiny12 has an on-chip brown-out detection (BOD) cir

Pagina 16

23ATtiny11/121006C–09/01Watchdog Reset When the Watchdog times out, it will generate a short reset pulse of 1 CK cycle dura-tion. On the falling edge

Pagina 17

24ATtiny11/121006C–09/01MCU Status Register – MCUSR for the ATtiny12The MCU Status Register provides information on which reset source caused an MCUre

Pagina 18

25ATtiny11/121006C–09/01bandgap reference uses approximately 10 µA, and to reduce power consumption inPower-down mode, the user can turn off the refer

Pagina 19

26ATtiny11/121006C–09/01interrupt is activated on rising or falling edge, on pin change, or low level of the INT0 pin.Activity on the pin will cause a

Pagina 20

27ATtiny11/121006C–09/01• Bit 0 - Res: Reserved BitThis bit is a reserved bit in the ATtiny11/12 and always reads as zero.Timer/Counter Interrupt Flag

Pagina 21

28ATtiny11/121006C–09/01MCU Control Register – MCUCRThe MCU Control Register contains control bits for general MCU functions.Note: The Pull-up Disable

Pagina 22

29ATtiny11/121006C–09/01Sleep Modes for the ATtiny11To enter the sleep modes, the SE bit in MCUCR must be set (one) and a SLEEP instruc-tion must be e

Pagina 23

3ATtiny11/121006C–09/01Figure 1. The ATtiny11 Block DiagramPROGRAMCOUNTERINTERNALOSCILLATORWATCHDOGTIMERSTACKPOINTERPROGRAMFLASHHARDWARESTACKMCU CONT

Pagina 24

30ATtiny11/121006C–09/01Note that if a level triggered or pin change interrupt is used for wake-up from Power-down Mode, the changed level must be hel

Pagina 25

31ATtiny11/121006C–09/01Timer/Counter0 The ATtiny11/12 provides one general-purpose 8-bit Timer/Counter – Timer/Counter0.The Timer/Counter0 has presca

Pagina 26

32ATtiny11/121006C–09/01Figure 24. Timer/Counter0 Block DiagramTimer/Counter0 Control Register – TCCR0• Bits 7..3 - Res: Reserved BitsThese bits are

Pagina 27

33ATtiny11/121006C–09/01The Stop condition provides a Timer Enable/Disable function. The CK down-dividedmodes are scaled directly from the CK oscillat

Pagina 28

34ATtiny11/121006C–09/01Watchdog Timer The Watchdog Timer is clocked from a separate on-chip oscillator. By controlling theWatchdog Timer prescaler, t

Pagina 29

35ATtiny11/121006C–09/011. In the same operation, write a logical one to WDTOE and WDE. A logical one must be written to WDE even though it is set to

Pagina 30

36ATtiny11/121006C–09/01ATtiny12 EEPROM Read/Write AccessThe EEPROM access registers are accessible in the I/O space.The write access time is in the r

Pagina 31

37ATtiny11/121006C–09/01selected address. If EEMWE is zero, setting EEWE will have no effect. When EEMWEhas been set (one) by software, hardware clear

Pagina 32

38ATtiny11/121006C–09/01Prevent EEPROM CorruptionDuring periods of low VCC, the EEPROM data can be corrupted because the supply volt-age is too low fo

Pagina 33

39ATtiny11/121006C–09/01Analog Comparator The Analog Comparator compares the input values on the positive input PB0 (AIN0) andnegative input PB1 (AIN1

Pagina 34

4ATtiny11/121006C–09/01ATtiny12 Block Diagram Figure 2. The ATtiny12 Block DiagramThe ATtiny12 provides the following features: 1K bytes of Flash, 64

Pagina 35

40ATtiny11/121006C–09/01• Bit 3 - ACIE: Analog Comparator Interrupt EnableWhen the ACIE bit is set (one) and the I-bit in the Status Register is set (

Pagina 36

41ATtiny11/121006C–09/01I/O Port B All AVR ports have true read-modify-write functionality when used as general digital I/Oports. This means that the

Pagina 37

42ATtiny11/121006C–09/01Port B Data Register – PORTBPort B Data Direction Register – DDRBNote: DDB5 is only available in ATtiny12.Port B Input Pins Ad

Pagina 38

43ATtiny11/121006C–09/01Alternate Functions of Port B All port B pins are connected to a pin change detector that can trigger the pin changeinterrupt.

Pagina 39

44ATtiny11/121006C–09/01Memory ProgrammingProgram (and Data) Memory Lock BitsThe ATtiny11/12 MCU provides two lock bits which can be left unprogrammed

Pagina 40

45ATtiny11/121006C–09/01• CKSEL3..0 fuses: See Table 3, “Device Clocking Options Select,” on page 5 and Ta bl e 9 , “ATtiny12 Clock Options and Start

Pagina 41

46ATtiny11/121006C–09/01provides a convenient way to download program and data into the ATtiny12 inside theuser’s system.The program and data memory a

Pagina 42

47ATtiny11/121006C–09/01High-voltage Serial Programming AlgorithmTo program and verify the ATtiny11/12 in the High-voltage Serial Programming mode,the

Pagina 43

48ATtiny11/121006C–09/01Figure 28. High-voltage Serial Programming WaveformsMSBMSBMSB LSBLSBLSB012345678910SERIAL DATA INPUTPB0SERIAL INSTR. INPUTPB1

Pagina 44

49ATtiny11/121006C–09/01Note: a = address high bitsb = address low bitsi = data ino = data outx = don’t care1 = Lock Bit12 = Lock Bit23 = CKSEL0 Fuse4

Pagina 45

5ATtiny11/121006C–09/01The ATtiny12 AVR is supported with a full suite of program and system developmenttools including: macro assemblers, program deb

Pagina 46

50ATtiny11/121006C–09/01High-voltage Serial Programming CharacteristicsFigure 29. High-voltage Serial Programming TimingLow-voltage Serial Downloadin

Pagina 47

51ATtiny11/121006C–09/01If the chip Erase command in Low-voltage Serial Programming is executed only once,one data byte may be written to the flash af

Pagina 48

52ATtiny11/121006C–09/01next instruction. See Table 28 on page 54 for tWD_FLASH and tWD_EEPROM values. In an erased device, no $FFs in the data file(s

Pagina 49

53ATtiny11/121006C–09/01Note: a = address high bitsb = address low bitsH = 0 - Low byte, 1 - High byteo = data outi = data inx = don’t care1 = Lock bi

Pagina 50

54ATtiny11/121006C–09/01Low-voltage Serial Programming CharacteristicsFigure 32. Low-voltage Serial Programming TimingTable 26. Low-voltage Serial P

Pagina 51

55ATtiny11/121006C–09/01Electrical CharacteristicsAbsolute Maximum RatingsOperating Temperature... -55°C to +125°C*NOTI

Pagina 52

56ATtiny11/121006C–09/01Notes: 1. “Max” means the highest value where the pin is guaranteed to be read as low.2. “Min” means the lowest value where th

Pagina 53

57ATtiny11/121006C–09/01External Clock Drive WaveformsFigure 33. External ClockNote: R should be in the range 3-100 kΩ, and C should be at least 20 p

Pagina 54

58ATtiny11/121006C–09/01ATtiny11 Typical CharacteristicsThe following charts show typical behavior. These figures are not tested during manu-facturing

Pagina 55

59ATtiny11/121006C–09/01Figure 35. Active Supply Current vs. VCCFigure 36. Active Supply Current vs. VCC, Device Clocked by Internal Oscillator01234

Pagina 56

6ATtiny11/121006C–09/01Note: “1” means unprogrammed, “0” means programmed.The various choices for each clocking option give different start-up times a

Pagina 57

60ATtiny11/121006C–09/01Figure 37. Active Supply Current vs. VCC, Device Clocked by External 32kHz CrystalFigure 38. Idle Supply Current vs. Frequen

Pagina 58

61ATtiny11/121006C–09/01Figure 39. Idle Supply Current vs. VCCFigure 40. Idle Supply Current vs. VCC, Device Clocked by Internal Oscillator0112232 2

Pagina 59

62ATtiny11/121006C–09/01Figure 41. Idle Supply Current vs. VCC, Device Clocked by External 32kHz CrystalFigure 42. Power-down Supply Current vs. VCC

Pagina 60

63ATtiny11/121006C–09/01Figure 43. Power-down Supply Current vs. VCCFigure 44. Analog Comparator Current vs. VCC01020304050607080901.5 2 2.5 3 3.5 4

Pagina 61

64ATtiny11/121006C–09/01Analog comparator offset voltage is measured as absolute offset.Figure 45. Analog Comparator Offset Voltage vs. Common Mode V

Pagina 62

65ATtiny11/121006C–09/01Figure 47. Analog Comparator Input Leakage CurrentFigure 48. Watchdog Oscillator Frequency vs. VCC6050403020100-100 0.5 1.51

Pagina 63

66ATtiny11/121006C–09/01Sink and source capabilities of I/O ports are measured on one pin at a time.Figure 49. Pull-up Resistor Current vs. Input Vol

Pagina 64

67ATtiny11/121006C–09/01Figure 51. I/O Pin Sink Current vs. Output VoltageFigure 52. I/O Pin Source Current vs. Output Voltage010203040506070800 0.5

Pagina 65

68ATtiny11/121006C–09/01Figure 53. I/O Pin Sink Current vs. Output VoltageFigure 54. I/O Pin Source Current vs. Output Voltage0510152025300 0.5 1 1.

Pagina 66

69ATtiny11/121006C–09/01Figure 55. I/O Pin Input Threshold Voltage vs. VCCFigure 56. I/O Pin Input Hysteresis vs. VCC00.511.522.52.7 4.0 5.0Threshol

Pagina 67

7ATtiny11/121006C–09/01External RC Oscillator For timing insensitive applications, the external RC configuration shown in Figure 5 canbe used. For det

Pagina 68

70ATtiny11/121006C–09/01ATtiny12 Typical CharacteristicsThe following charts show typical behavior. These data are characterized, but nottested. All c

Pagina 69

71ATtiny11/121006C–09/01Figure 58. Active Supply Current vs. VCC, Device Clocked by External 32kHz CrystalFigure 59. Idle Supply Current vs. VCC, De

Pagina 70

72ATtiny11/121006C–09/01Figure 60. Idle Supply Current vs. VCC, Device Clocked by External 32kHz CrystalAnalog Comparator offset voltage is measured

Pagina 71

73ATtiny11/121006C–09/01Figure 62. Analog Comparator Offset Voltage vs. Common Mode VoltageFigure 63. Analog Comparator Input Leakage Current0246810

Pagina 72

74ATtiny11/121006C–09/01Figure 64. Calibrated RC Oscillator Frequency vs. VCC Figure 65. Watchdog Oscillator Frequency vs. VCCCALIBRATED RC OSCILLAT

Pagina 73

75ATtiny11/121006C–09/01Sink and source capabilities of I/O ports are measured on one pin at a time.Figure 66. Pull-up Resistor Current vs. Input Vol

Pagina 74

76ATtiny11/121006C–09/01Figure 68. I/O Pin Sink Current vs. Output Voltage (VCC = 5V)Figure 69. I/O Pin Source Current vs. Output Voltage (VCC = 5V)

Pagina 75

77ATtiny11/121006C–09/01Figure 70. I/O Pin Sink Current vs. Output Voltage (VCC = 2.7V)Figure 71. I/O Pin Source Current vs. Output Voltage (VCC = 2

Pagina 76

78ATtiny11/121006C–09/01Figure 72. I/O Pin Input Threshold Voltage vs. VCC (TA = 25°C)Figure 73. I/O Pin Input Hysteresis vs. VCC (TA = 25°C)00.511.

Pagina 77

79ATtiny11/121006C–09/01Notes: 1. For compatibility with future devices, reserved bits should be written to zero if accessed. Reserved I/O memory addr

Pagina 78

8ATtiny11/121006C–09/01Architectural OverviewThe fast-access register file concept contains 32 x 8-bit general-purpose working regis-ters with a singl

Pagina 79

80ATtiny11/121006C–09/01Note: 1. For compatibility with future devices, reserved bits should be written to zero if accessed. Reserved I/O memory addre

Pagina 80

81ATtiny11/121006C–09/01Instruction Set SummaryMnemonics Operands Description Operation Flags #ClocksARITHMETIC AND LOGIC INSTRUCTIONSADD Rd, Rr Add t

Pagina 81

82ATtiny11/121006C–09/01DATA TRANSFER INSTRUCTIONSLD Rd,Z Load Register Indirect Rd ← (Z) None 2ST Z,Rr Store Register Indirect (Z) ← Rr None 2MOV Rd,

Pagina 82

83ATtiny11/121006C–09/01Note: The speed grade refers to maximum clock rate when using an external crystal or external clock drive. The internal RC osc

Pagina 83

84ATtiny11/121006C–09/01Packaging Information8P310.16(0.400)9.017(0.355)PIN17.11(0.280)6.10(0.240).300 (7.62) REF5.33(0.210) MAX254(0.100) BSC 0.381(0

Pagina 84

85ATtiny11/121006C–09/018S2.020 (.508).012 (.305).213 (5.41).205 (5.21).330 (8.38).300 (7.62)PIN 1 .050 (1.27) BSC.212 (5.38).203 (5.16).080 (2.03).07

Pagina 85 - 1006C–09/01

© Atmel Corporation 2001.Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company’s standa

Pagina 86 - 1006C–09/01/xM

9ATtiny11/121006C–09/01Figure 6. The ATtiny11/12 AVR RISC ArchitectureA flexible interrupt module has its control registers in the I/O space with an

Comentarios a estos manuales

Sin comentarios