Note - you'll want to have completed or looked over this post as well. It shows how to make the Arduino Sketchbook folder if you don't know how to already, as well as setting up the 'core' file and such.
So, the ATTiny85 is good and everything; it's small, it's easy to program, but it only has five usable pins. Plus, it's memory isn't too great. Sometimes, you need more like 17 pins. That is when the ATTiny2313 comes in handy. It is a twenty-pin chip, has UART (your basic serial connection), I2C, SPI... a lot more than the Tiny85 (Which only has USI, or Universal Serial Interface). In this post I'm going to show how to install the cores, which is really the same as installing the ATTiny core, but there are a few hints.
Thursday, August 18, 2011
ATTiny2313 with Arduino
Labels:
arduino,
attiny,
cores,
electronics,
programming,
SPI
Saturday, August 13, 2011
Programming the ATTiny85, Arduino Style
This is a sort of a continuation of the last post. In the last post, I showed how to load the ATTiny85 cores into the Arduino IDE. If that worked for you, cool! This how to actually program the chip. If it didn't work... put a comment somewhere. I'll try to help.
Anyway, programming the ATTiny is very easy. The only thing you really need to do is set up a target board. This is either a breadboard, perfboard, or PCB circuit that interfaces the ATTiny to an Arduino board. The circuit should have these connections:
Anyway, programming the ATTiny is very easy. The only thing you really need to do is set up a target board. This is either a breadboard, perfboard, or PCB circuit that interfaces the ATTiny to an Arduino board. The circuit should have these connections:
This is called ISP circuit. The chips communicate over SPI via this configuration. |
Learning a Good Lesson the Hard Way
This week, I made a PCB on which I was going to put some LED's and a little microcontroller. However, when I got one part of it soldered and tested it (always a good idea) I found that the LED's hardly lit up. I could see them turn green, but they weren't casting any real light.
Here all the through-hole components are soldered on the board. |
Wednesday, August 3, 2011
Using Arduino with ATTiny's
I really like the Arduino IDE. I also like the language that is much simpler, if less powerful, than the common Assembly/C code for other AVR's. However, Arduino uses a very limited chipset. You can use ATMega168, ATMega328, ATMega1260, ATMega 2560, and thats about it. Many times I want a lower cost, smaller form-factor chip for a project. The ATMega chips have lots of memory, interrupts, timers, and suchlike, but sometimes that's overkill. That's why I like to use the ATTiny line.
A flock of three ATTiny85's and an ATTiny 2313 with a lone ATMega328 outside. |
Monday, August 1, 2011
WiiChuck Library
One of my favorite libraries for Arduino is the WiiChuck library. WiiChuck allows the Arduino to interface to a Wii Nunchuck. What is cool about the Nunchuck is that it has a three-axis accelerometer, a two-axis joystick, and two buttons. And it's I2C, so it's easy to work with. However, you will need one of these things to actually use it. You'll also need to solder four header pins to little PCB so you can plug it into the Arduino.
There are five contacts in the WiiChuck socket. Three on the right, two on the left. |
Subscribe to:
Posts (Atom)