![]() ![]() ![]() ![]() Go to 'Tools-Clock' -> Choose 8Mhz (or 1 if you prefer) Go to 'Tools-Processor' -> Choose Attiny85 So, presuming you use the Arduino as ISP,: Now obviously there is no bootloader for the attiny85, but the process of burning the bootloader sets the fuses of the attiny from factory mode, to the mode you want to use it in. Nevertheless I'll run you through some pitfalls:īurn the bootloader!!! I am probably saying things most people already know but you'd be surprised how many people dont know. If for whatever reason you cannot or do not want to move the Malpartida library out of the way, either rename the LiquidCrystal_I2C.h and LiquidCrystal_I2C.cpp modules in that library, or put the BroHogan LiquidCrystal_I2C.h and LiquidCrystal_I2C.cpp files in your sketch directory (and change the fishhook call into parenthesis). Make sure you have the TinyWireM library installed and make sure your libraries are up to date. Grab the entire folder and move it out of your sketchbook/libraries folder. If you are using Malpartida's library and want to keep that (as it is a great library), move it out of the way. If you are using the standard Arduino LCD library, best replace it by the Bro Hogan library. Most problems you may encounter are related to the IDE getting confused regarding the libraries. I will be using the Bro Hogan library here. ![]() It is basically the same library as the standard arduino LCD library, but it is modified to recognize the Attiny85 and the Attiny2313 and then makes a call to 'TinyWireM' rather than 'Wire'.Īdafruit also provides a libray that works with the Attiny85 and that is described in another instructable. The 'Bro Hogan' library however does work. A modification to make it work with Attiny85 can be found here. The 'NewLCD' library from Francisco Malpartida is my favorite library, but also that one fails in using I2C for the Attiny because it makes a call to the Wire library. The standard Arduino library cannot be used for I2C on the Attiny because it does a call to 'Wire.h' and that one is not compatible with the Attiny. It needs the TinyWireM library to act as an I2C master The 'Wire' library that is used to read and write bytes from and to the I2C port on the arduino doesnt work on the attiny. The attiny85 can simulate I2C on PB2 (pin 7) (SCL) and PB0 (pin 5) (SDA). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |