Tag Archives: ATtiny
Atmel tinyAVR microcontrollers are optimized for applications that require performance, power efficiency and ease of use in a small package. All tinyAVR devices are based on the same architecture with other AVR devices. The integrated ADC, DAC, EEPROM memory and brown-out detector let you build applications without adding external components. The tinyAVR also offers Flash Memory for fast, secure and cost-effective in-circuit upgrades that significantly cuts your time to market.
The latest tinyAVR devices (ATtiny417/814/816/817) by Atmel combine AVR core with CIPs (Core Independent Peripherals). PIC microcontrollers with Core Independent Peripherals (CIPs) already raised the performance of 8-Bit-MCUs to a new level. Since the acquisition of Atmel by Microchip, this is the first time the company leverages features from both MCU families.
So, now the question is:
What Is CIP?
In fact, the term CIP or Core Independent Peripherals is pretty much self-explanatory. Microchip’s description of CIP is:
CIPs allow the peripherals to operate independently of the core, including serial communication and analog peripherals. Together with the Event System, that allows peripherals to communicate without using the CPU, applications can be optimized at a system level. This lowers power consumption and increases throughput and system reliability.
Core Independent Peripherals or CIPs are designed to handle their tasks with no code or supervision from the CPU to maintain their operations. As a result, they simplify the implementation of complex logic control systems and give designers the flexibility to innovate.
ATtiny Models With CIPs:
8-bit Atmel AVR microcontroller with 4KB Flash, 256 bytes SRAM, 128 bytes EEPROM, 20MHz/20 MIPS, two 16-bit timer/counters, one 12-bit timer/counter, RTC, USART, SPI, Two-wire Interface (I2C), 10-bit ADC, 8-bit DAC, analog comparator, accurate internal oscillators and multiple calibrated voltage references, Custom Logic, 10-bytes unique ID, and 24 pins.
- ATtiny814 :
- 8-bit Atmel AVR microcontroller with 8KB Flash, 512 bytes SRAM, 128 bytes EEPROM, 20MHz/20 MIPS, two 16-bit timer/counters, one 12-bit timer/counter, RTC, USART, SPI, Two-wire Interface (I2C), 10-bit ADC, 8-bit DAC, analog comparator, accurate internal oscillators and multiple calibrated voltage references, Peripheral Touch Controller (PTC), Custom Logic, 10-bytes unique ID, and 14 pins.
- ATtiny816 :
- 8-bit Atmel AVR microcontroller with 8KB Flash, 512 bytes SRAM, 128 bytes EEPROM, 20MHz/20 MIPS, two 16-bit timer/counters, one 12-bit timer/counter, RTC, USART, SPI, Two-wire Interface (I2C), 10-bit ADC, 8-bit DAC, analog comparator, accurate internal oscillators and multiple calibrated voltage references, Peripheral Touch Controller (PTC), Custom Logic, 10-bytes unique ID, and 20 pins.
- ATtiny817 :
- 8-bit Atmel AVR microcontroller with 8KB Flash, 512 bytes SRAM, 128 bytes EEPROM, 20MHz/20 MIPS, two 16-bit timer/counters, one 12-bit timer/counter, RTC, USART, SPI, Two-wire Interface (I2C), 10-bit ADC, 8-bit DAC, analog comparator, accurate internal oscillators and multiple calibrated voltage references, Peripheral Touch Controller (PTC), Custom Logic, 10-bytes unique ID, and 24 pins.
Paweł Spychalski faced this problem while building his own weather station that is based on Raspberry Pi. It collects various data and displays them on dedicated web page and Android app. Every few months he tries to add a new sensor to it. Last time it was a daylight sensor. He added this sensor to his system by using ATtiny85 and it was connected via I2C bus.
The Inter-integrated Circuit (I2C) Protocol is a protocol intended to allow multiple “slave” digital integrated circuits (“chips”) to communicate with one or more “master” chips. Like the Serial Peripheral Interface (SPI), it is only intended for short distance communications within a single device. Like Asynchronous Serial Interfaces (such as RS-232 or UARTs), it only requires two signal wires to exchange information.
I2C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock Line (SCL), pulled up with resistors. Typical voltages used are +5 V or +3.3 V although systems with other voltages are permitted.
Most of developers use I2C to connect to sensors with the help of the Arduino “Wire” library or “i2c-tools” on the Pi, but it is rare to see someone that is actually building the I2C slave device. Paweł’s project uses TinyWireS library, a slave-mode SPI and I2C library for AVR ATtiny Arduino projects.
This diagram shows how to build analog to digital converter using ATtiny85 and connect it to any device (Raspberry Pi, Arduino) using I2C bus. Here photoresistor has been used, but any analog meter will be fine: temperature, potentiometer, moisture…
ATtiny85 directly connected to Raspberry Pi via I2C, photoresistor with 10kOhm pull down connected to ATtiny85 and signal LED.
For reading data you can use this code. ATtiny sends current measurement as two 8 bit value. First older bits, then younger 8 bits.
To do this project you need to use Arduino IDE 1.6.6., TinyWireS library,ATtiny45/85 board, plus an 1MHz internal oscillator.
Watchdog timer interrupts ATtiny every few minutes, measures voltage, filters it and stores in memory. Every time read operation is requested, last filtered ADC value (10 bits as 2 bytes). I2C support is provided by TinyWireS library that configures ATtiny USI (Universal Serial Interface) as I2C slave.
This cool weather station and its need of daylight sensor is only an example. The amazing thing is that you can now build new I2C sensors and introduce new modules to your projects easily following Paweł’s steps.
Hi! Today I’ll explain you how to recover your bricked ATtiny microcontroller using your Arduino board. ATtinys are very popular due to their small form factor yet very powerful. While working with them you may accidentally brick the ATtiny. As arduino is extremely popular and really easy to use, I guess you have one or more lying on your work table. You don’t need to purchase a HVP (High Voltage Programmer), or search for an old PC with parallel port to recover ATtiny. Just build a small circuit, plug it into Arduino board, upload a sketch and you are good to go. So let’s start… (more…)
Rahul @ Xanthium has posted a tutorial on interfacing ATtiny with L293D:
In this tutorial we will learn to interface L293D with ATMEL ATtiny microcontroller and control them bidirectionally.The microcontroller used here is ATtiny2313A which is interfaced to two L293D motor control chips for controlling upto 4 DC brushed motors.You can control upto 8 motors if bidirectional control is not needed.
The ability to control upto 4 motors is essential when we are building 4 wheel drive robotic projects like Rovers or under water ROV’s.
ATtiny based bidirectional motor control using L293D – [Link]
陳亮 @ instructables.com shows us his ATtiny85 OLED display build on a breadboard:
This instructable show how to use an ATtiny85 to create a tiny watch core that can run over 1 year before recharge or replace battery.
The instruction to make the watch case may be in next instructable.
I have made a few Arduino watch before, but I found the watch using ATmega boards or ATmega chips are a little bit too big to wear. So I would like to make it with a smaller chips.
ATtiny OLED Watch Core – [Link]
by ThomasVDD @ instructables.com:
Capacitors are vital components in electronics, but sometimes they are broken, or the value printed on the cap has become unreadable. Because my multi-meter does not have a capacitance measurement, I decided to make one!
The principle of measuring capacitance is quite simple. The voltage of a capacitor charging through a resistor increases with time T. The time it takes to reach a certain voltage, is related to the values of the resistor and capacitor. In this project, we’ll use a 555 timer circuit as a monostable multivibrator. If that sounds like some dark magic to you, don’t worry, it’s quite straightforward. I’ll refer to the the Wikipedia page for the details, as we’ll focus on the things we really need: the schematic and formula. The time in which the capacitor C charges through the resistor R is given by: T = ln(3) x R x C = 1.1 RC. If we know the value of the resistor and the time, we can calculate the capacitance: C = T / 1.1R.
Capacitance Meter – [Link]