background preloader

Programming an ATtiny w/ Arduino

Programming an ATtiny w/ Arduino
This tutorial shows you how to program an ATtiny45 or ATtiny85 microcontroller using the Arduino software and hardware. The ATtiny45 and ATtiny85 are small (8-leg), cheap ($2-3) microcontrollers that are convenient for running simple programs. This tutorial is obsolete! See the updated version of this tutorial (with support for Arduino 1.0). They are almost identical, except that the ATtiny85 has twice the memory of the ATtiny45 and can therefore hold more complex programs. Materials and Tools For this tutorial, you’ll need: Arduino Uno or Duemilanove (w/ an ATmega328, not an older board with an ATmega168) ATtiny45 or ATtiny85 (8-pin DIP package) a 10 uF capacitor (e.g. from Sparkfun or from Digi-Key ) a breadboard jumper wires For more information, see our list of materials and parts and our list of prototyping supplies . Software You’ll need the Arduino software (version 0022) and a plugin to add support for the ATtiny45/85. Download: Arduino software , attiny45_85.zip Pin connections: Related:  ATTINYArduinojuguetes

Program an ATtiny Using an Arduino I am a big fan of the Arduino platform. For those who aren’t familiar with the Arduino, it is a microprocessor development environment & ecosystem. You can visit their site for more info. I started playing with the Arduino and soon discovered the ATtiny microprocessor chip, which is a much smaller cousin to the ATmega series which is used in the Arduino. Unfortunately, the Arduino IDE did not support it. All of this changed yesterday when I was going through my Arduino notes and came across some attempts by others to use the Arduino IDE to program the ATtiny. Close only counts in horseshoes and hand grenades I was all set now. avrdude: stk500_recv(): programmer is not responding I was close, but no cigar. Programming Your Own ATtiny – in 9 easy steps For those wanting an easy way to program ATtiny chips, here is what you need to do: Make sure you are using the latest Arduino IDE – currently version 022. Troubleshooting Verify each step and the results. Conclusion

PortManipulation Reference Language | Libraries | Comparison | Changes Port registers allow for lower-level and faster manipulation of the i/o pins of the microcontroller on an Arduino board. The chips used on the Arduino board (the ATmega8 and ATmega168) have three ports: B (digital pin 8 to 13) C (analog input pins) D (digital pins 0 to 7) Each port is controlled by three registers, which are also defined variables in the arduino language. DDR and PORT registers may be both written to, and read. PORTD maps to Arduino digital pins 0 to 7 DDRD - The Port D Data Direction Register - read/write PORTD - The Port D Data Register - read/write PIND - The Port D Input Pins Register - read only PORTB maps to Arduino digital pins 8 to 13 The two high bits (6 & 7) map to the crystal pins and are not usable DDRB - The Port B Data Direction Register - read/write PORTB - The Port B Data Register - read/write PINB - The Port B Input Pins Register - read only PORTC maps to Arduino analog pins 0 to 5. Examples See

Arduino turns off idle Amplifier What is this? NovaIdle is monitoring amplifier for idle time (no music played) and turns off the amplifier with IR command It is written and tuned for the Peachtree Nova amplifier that has a tube. I wrote this program as I tend to forget the amplifier on and given the tube has limited ifetime, I am always feeling bad when I see it still on few hours later. Not to mention of course that we can be a bit more green by preserving power. I published another version of this (for a Kenwood amplifier too) What You need to build this? Optional Components: 1x Blue LED 1x Yellow LED 1x Green LED 3x 330 Ohm Resistor (anything from 220 to 330 will do) 1x Prototype board to solder and connect the above 1x 3.5mm Earphone Stereo Jack 1x RCA to 3.5mm Stereo cable 1x USB Power supply (or you can feed it from other source) Sampling the audio in every 2 secods and the idle time is set to 5 minutes (you can change it in the code), enough time to swap CD's or to tell my Sonos which album to play next.

arduino-tiny - ATtiny core for Arduino Arduino-Tiny is an open source set of ATtiny "cores" for the Arduino platform. The Arduino platform currently supports Atmel ATmega processors. There is a need for the Arduino platform to work with physically smaller DIP package processors. The intent of this project is fulfill that need. Specifically, our goal is to provide a core that enables Arduino users to work with the ATtiny84 (84/44/24), ATtiny85 (85/45/25), and ATtiny2313 (4313) processors. Download the latest version for Arduino 1.0 Download the latest version for Arduino 1.5 Arduino libraries available for ATtiny processors... I2C / TWI Master library for the ATtiny85 Alternatives to this core (as of 2010-Nov-16)... bohne (René Bohne) published '2313 and '84 cores... SuperCow (R.Wiersma) published an '84 core... saposoft (Alessandro Saporetti) published a '45 core...

Welcome ATtiny breadboard headers These tiny controller boards are build to provide a quick start for projects with 8 and 20 pin AVR microcontrollers, e.g. ATtiny13, ATtiny45, ATtiny85 and ATtiny2313. They don’t include any fancy stuff, they are just as simple as possible. Where is the problem? Whenever I was prototyping on a breadboard I was annoyed by all the wires to setup before the actual project could begin. The solution These little breadboard headers are very handy. 6 pin ISP (In System Programming) header8 MHz resonatorReset pull-up resistor and reset switchblocking capacitorsSerial connection header (FTDI-cable compatible), only on the ATtiny2313-Header If these boards look somehow familliar to you, they are inspired by the Arduino compatible RBBB and the Boarduino. Failure And as Sparkfun showed us that you don’t have to be ashamed of what you screw up, here is one of my failures. Outlook They work like a charm. Update 2009/03/15: The kits are now available in the store. Downloads Eagle schematics: headers-v10

playground - BitMath Note: This page was inspired by a conversation that took place in the Arduino forum. Table of Contents Introduction Often when programming in the Arduino environment (or on any computer, for that matter), the ability to manipulate individual bits will become useful or even necessary. Saving memory by packing up to 8 true/false data values in a single byte. In this tutorial, we first explore the basic bitwise operators available in the C++ language. The Binary System To better explain the bitwise operators, this tutorial will express most integer values using binary notation, also known as base two. In the familiar decimal system (base ten), a number like 572 means 5*102 + 7*101 + 2*100. It is crucial that you understand how the binary system works in order to follow the remainder of this tutorial. Unfortunately, most C++ compilers do not have any means of expressing binary numbers directly in source code. Bitwise AND Bitwise OR The bitwise OR operator in C++ is the vertical bar symbol, |. or

xoscillo - A software oscilloscope that acquires data using an arduino or a parallax (more platforms to come). About This is a multiplatform software oscilloscope and logical analyzer. It supports arduino(with custom firmware) and a Parallax USB oscilloscope. More platforms to come. Features Panoramic view Load and save waveforms Zoom in and out Can open several waveforms at the same time Can run several oscilloscopes/logical analyzers simultaneously Frequency analysis using FFT Filtering, so far it has a low pass filter, probably more to come. Supported platforms Support Ask here in our forum Screenshots Basic screen shot showing the oscilloscope displaying a simple waveform Logic analyzer screenshot Displays the FFT of the signal and underneath the FFT over time. This screen shot shows an arduino based oscilloscope and a parallax one working simultaneously in realtime. Linux Notes from the Author The code is not by any means great, its just a quick exercise I did to learn c#. License

Tutorial Arduino - Programar AVR ATtiny45 y 85 con Arduino Hola amig@s! Comienzan las colaboraciones! Gracias a Miguel Angel, miembro de AEROBOT, tenemos nuestro primer tutorial sobre como programar los micros AVR ATtiny45 y 85 utilizando un Arduino. Así que empecemos!! Más de una vez os habrá pasado, que después de haber testeado vuestro prototipo deseáis hacer de él una aplicación real. Si estáis familiarizados con el uso de microcontroladores PIC o AVR y tenéis los conocimientos y herramientas (compiladores, grabadores…) necesarios, esto se resuelve fácilmente acudiendo al micro que más se ajusta a nuestras necesidades…y este post no tendría sentido! Partamos de la idea, de que muchos usuarios de Arduino, no tienen acceso a estos conocimientos ni herramientas y están únicamente familiarizados con el uso de esta estupenda plataforma, en la cual además acaban de prototipear el proyecto que ahora quieran llevar a la aplicación final. Éstas son sus características esenciales: Pero por si acaso lo vamos a repasar juntos Ahora una vista de las pistas:

Serial Peripheral Interface Bus SPI bus: single master and single slave Interface[edit] The MOSI/MISO convention requires that SDI on the master be connected to SDO on the slave, and vice versa. Chip select polarity is rarely active high, although some notations (such as SS or CS instead of nSS or nCS) suggest otherwise. SPI port pin names for particular IC products may differ from those depicted in these illustrations. The master does not use an addressing concept while communicating with the slave. Operation[edit] The SPI bus can operate with a single master device and with one or more slave devices. If a single slave device is used, the SS pin may be fixed to logic low if the slave permits it. Most slave devices have tri-state outputs so their MISO signal becomes high impedance (logically disconnected) when the device is not selected. Data transmission[edit] To begin a communication, the bus master first configures the clock, using a frequency less than or equal to the maximum frequency the slave device supports.

protolab / TutorialSensors This group of tutorials will help you work with the continuous input values provided by analog sensors - potentiometers, accelerometers, distance rangers, etc. Dimmer: Fading an LED with a Potentiometer In this example we'll build a light dimmer: a knob connected to a light so that when you turn the knob, the light increases or decreases in brightness. Connect the middle pin of the potentiometer to analog input 0, the other two to +5V and ground.Through a 220Ohm resistor, connect an LED to pin 9(anode or long side to resistor, cathode to pin 9) The code for this example is led_dimmer_01 Questions to answer to yourself/Extensions if you're ahead: why are we using (255-val) instead of val? Drawing a graph of analog input Let's understand better what the values are that we are reading from the analog input. Leave the potentiometer part of your circuit, you may take off the LED part if you want to . Arduino reports the voltage as a number between 0 and 1023. V_analog = 5.0V*(SensorReading/255.0)

Txapuzas electrónicas: PaperTeclado: Un teclado con una hoja impresa de papel Introducción ¿Necesitas unos pulsadores para tu proyecto con un microcontrolador? Lo puedes hacer muy fácilmente, simplemente imprimiendo una hoja de papel a la que se fijarán con cinta adhesiva unos cables. NOTA: Sólo funciona con hojas impresas en impresora de inyección de tinta. Este proyecto recoje la idea de unos documentos de CienciaRedCreativa: En estos documentos se demuestra que: "Las bandas realizadas sobre un papel con una impresora de inyección de tinta son ligeramente conductoras, y que a medida que aumenta la longitud de la banda, la resistencia y que a medida que aumenta el ancho de la banda la resistencia eléctrica disminuye". Funcionamiento Realización Hacemos dos pequeños cortes en el lateral para los cables: PaperTecladoN8.pde

Related: