Attiny Serial Port Programmer
I2C, or the Inter-integrated Circuit protocol, allows many devices to communicate using the same two wires. It’s particularly useful if you want to build a central device that can be expanded later in an unknown direction, as we are doing with the electronic badge project. To get a “hello world” example going, I took the following steps:.
Download the TinywireS Arduino library and unzip it into Documents/Arduino/Libraries. As of this writing, the most current distribution is not working, so make sure you use. Restart the IDE if it is open. Grab a master device like an Arduino UNO. Figure out which pins are SDA and SCL; these are the two wires used in i2c communication.
My version of the UNO has dedicated SDA/SCL lines, but they are not indicated by the silkscreen on top of the board, rather, they are labeled on the bottom. Use jumpers to connect SDA SDA and SCL SCL between your two devices.
Upload the following code. Tip: you may find that you need to fully disconnect one device while uploading to the other. Don’t forget to change the programmer between AVRISPmkII (for UNO) and USBTinyISP (for Attiny). The Attiny is amazing!
This means that the programmer couldn't talk to the chip. If you are using a 'simple' programmer such as a serial or parallel port bitbang programmer, it could mean the programmer is at fault. Otherwise, it usually means the programmer is OK but it couldnt find the chip.
This teeny part can replace a whole Arduino board at a fraction of the cost and size. They are a little less user-friendly to program, so here are the steps I took.BOM. Laptop (OSX).1 uF ceramic capacitor. Breadboard, jumpers, resistors, LEDs, etc.Process. Wire the programmer to the Attiny.
This process confused the heck outta me. See the image above; if you are looking at a 2×3 header on the PCB, use the layout at lower left. If you are looking at the bottom of the female plug on the end of the programming cable, use the layout at lower right. In both cases, note the orientation of the polarizing notch. Add a.1uF ceramic capacitor (code 104) between power and ground and as close to the chip as possible. I used to skip this step and paid for it with hours of troubleshooting!.
Attiny Serial Port Programmer
Install in the Arduino IDE. Set the following in the Arduino IDE Tools menu:. Board: Attiny 25/45/85. Processor: Attiny85. Clock: 1Mhz.
Port: Leave this alone. As I understand it, this programmer does not communicate via serial interface and will act like you don’t have anything plugged in. Programmer: USBTinyISP. Make sure the ATTiny programmer is supplying power to the chip.
Atmel Serial Port Programming
Tools Burn Bootloader. This only has to be done once, unless your future sketches need to run at a different speed.
8mhz seems to be well-supported. Upload blink and wire your LED using the following. Note that if you use the same Sparkfun product I did, there appears to be a current leak to VIN whether you set the programmer to supply power or not.