Servo8Bit Library version 0.6 releasedPosted: February 25, 2012 | Author: ilya | Filed under: Uncategorized | 20 Comments »
The next version of the Servo8Bit library is released which includes the much sought after integration with Arduino libraries for the Attiny as well as other various improvements.
Here is a run down of what’s new:
- Now works with various Arduino libraries for the Attiny45 and Attiny85.
- Added support to run at 1mhz in addition to 8mhz.
- Added ability to easily select if this library should use timer0 or timer1.
- By default timer1 is now used. The old default used to be timer0.
Download the Servo8Bit library from its Github page here https://github.com/fri000/Servo8Bit .
If you’re unfamiliar with Git Hub you should know that you can download all of the library files by click on the “ZIP” button, at the top left corner. Part of the download is an example program that shows you how to use the library on a bare bone Attiny. If you looking to use the Servo8Bit with an Arduino library check out this example, which shows you how to do just that.
When you use Servo8Bit with an Attiny Arduino library (such as the one found here) I recommended that you run the Attiny chip at 8mhz , instead of at 1mhz. The Arduino library uses it own interrupts (in order to keep track of time and what not) which sometimes fire at the same time as the interrupt used by the Servo8bit driver. The interrupts step on each other’s toe, so to speak. The effect is that sometimes the connected servo jerks a bit because the PWM pulse sent to it was too long. Running at 8mhz reduces this effect by a lot.