Core for Attiny87
Hi,
Thank for your job about the attiny cores, i am working with attiny84 (using jeelib) and it's works well, but i work on attiny87/167 and i've issue in my arduino IDE, about Serial not declared ...(o've had the same issue with ATTINY84 and resolved by the core updated) i've seen that your job for attiny87 is in progress? could you help me to integrate a fonctional core for attiny87 ?
Thanks for your answer, I'm really stuck... Michael
The Attiny87/167 support was never completed (that is why there is a file saying "do not use!"). I have however since written an update to the core which does support the 167 and presumably the 87. I will upload the fix as soon as possible.
I would like to add a big THANK YOU also for your work. I have been working on the TINY now for a while and your posts are a great help.
Keep up the good work!
Edward M. Goldberg e.m.g.
Thanks for your answer. Thanks for your job. I m happy to hear that y ou have updated support for the attiny87. Waiting for the release soon . Great ^^ . Michael Le 25 mai 2013 21:44, "Edward M. Goldberg" [email protected] a écrit :
I would like to add a big THANK YOU also for your work. I have been working on the TINY now for a while and your posts are a great help.
Keep up the good work!
Edward M. Goldberg e.m.g.
— Reply to this email directly or view it on GitHubhttps://github.com/TCWORLD/ATTinyCore/issues/5#issuecomment-18452772 .
Hi Tom,
I would like to ask you just for plan the work team when you think upload the update ? To get an idea, I presume you re very busy on the ASTRO Project. Thanks for you report,
Michaël.
Sorry for the delay. I have pushed a new version of the core. It is part tested with the attiny167 rather than the 87, but the two should be similar. If you have any problems, let me know.
Tom ,
Already tested, no errors on compilation, Big Thank you about your kindness, I 'll keep you informed about our tests on the attiny, and will show you the result on our Domotic Project. Maybe it can be interested you,
Thanks again, Michaël.
2013/5/29 Tom Carpenter [email protected]
Sorry for the delay. I have pushed a new version of the core. It is part tested with the attiny167 rather than the 87, but the two should be similar. If you have any problems, let me know.
— Reply to this email directly or view it on GitHubhttps://github.com/TCWORLD/ATTinyCore/issues/5#issuecomment-18609903 .
Hi Tom,
After some tests on Attiny167 and RFM12B, the module does not work, i 've investigated on pin association, and i would like you to valid the pin association below. Could you help me please ?
On pins_arduino.h you write :
//#define SS 7 //#define MOSI 5 //#define MISO 4 //#define SCK 6
and
// +-/-+ // RX (D 0) PA0 1| |20 PB0 (D 4) // TX (D 1) PA1 2| |19 PB1 (D 5) // (D 12) PA2 3| |18 PB2 (D 6) // (D 3) PA3 4| |17 PB3 (D 7) // AVCC 5| |16 GND // AGND 6| |15 VCC // INT1 (D 11) PA4 7| |14 PB4 (D 8) // (D 13) PA5 8| |13 PB5 (D 9) // (D 10) PA6 9| |12 PB6 (D 2)* INT0 // (D 14) PA7 10| |11 PB7 (D 15) // +----+
fallowing the image about RFM12B module joined, I ve plugged : * * RFM12B | ATTINY167
MISO | pin 20 PB0 (D 4) IRQ | pin 18 PB2 (D 6) SS | pin 17 PB3 (D 7)* SCK | pin 18 PB2 (D 6) MOSI | pin 19 PB1 (D 5) GND | GND +3,3V | +3,3V
is it correct ? Thank for you answer. Michaël.
There is a mistake in the pins_arduino.h file. The correct SPI pins are:
#define MISO 12 #define MOSI 11 #define SCK 13 #define SS 10
As could be found in the Datasheet. I forgot to update them when I was making the file.
Is this now resovled?
Hi Tom,
I'm happy to see you follow me, On my arduino sketch, there is no compilation error, and basic instruction works fine (digitalRead, write ..) but, i've coupled with the librairy jeelib (RFM12B module), and after some definitions for Attiny87/167 added, we don't understand why the attiny167 reset all the time or freeze.
Maybe you can think about thing which can block, i don't know if you 've work on jeelib before ?
Here is the RF12.cpp definition,
#elif defined(AVR_ATtiny87) || defined(AVR_ATtiny167)
#define RFM_IRQ 2
#define SS_DDR DDRB #define SS_PORT PORTB #define SS_BIT 4
#define SPI_SS 10
#define SPI_MISO 12
#define SPI_MOSI 11
#define SPI_SCK 13
we suppose SS_BIT is pin nSEL on RFM12B module.
thanks for watching.
Michaël.
The attiny 87/167 only has 512bytes of RAM, which is almost nothing. If the processor is resetting randomly or behaving eratically it usually means a stack overflow - in other words you are using too much RAM.
I have a quick look at Jeelib and that uses at least 216 bytes statically, plus whatever it uses dynamically. Add on top of that any variables you are using, plus the 32ish bytes if you are using the Serial class. Plus add on function calls etc.