I have another project where I would like to include an attiny - right now it's an attiny84. It would be an spi slave on one side connected to PC-serial on the other side - needs to be bidirectional.
-put it in the sketch folder and copied the "attiny84at8.name=ATtiny84 @ 8 MHz (internal oscillator; BOD disabled)" board type to a new boards.txt
-cobble up a breadboard connection for the '84 and start playing with code
Is there a worked example or tutorial somewhere?
I bet a lot of people would appreciate it if there was a sticky at the head of this forum that would point to the latest stable tiny cores and tutorials/examples of use.
Edit: And the sticky should tell you how to track which pin is which and what is supported e.g. serial in/out
ralphd:
The Serial class in tiny cores is ouput only, so you'll need to use another serial library to receive.
thanks: is this true for the 2313 as well? It might just be easier for me to use avr studio. I have a good sized arduino program that I want to port though so I'd much rather stick with the IDE.
also: how do i map which pin is where for the various processors?
well here's a bunch of no fun - it compiles but it won't load. I know it works in studio with avrisp on com4 so I've selected "attiny2313at8.upload.protocol=avrispv2" and port com 4. I get the first set of gibberish. Tried using "upload using programmer" with programmer set to avrisp and i get the second set of gibberish - which looks a bit more informative at least.
ralphd:
The Serial class in tiny cores is ouput only, so you'll need to use another serial library to receive.
thanks: is this true for the 2313 as well? It might just be easier for me to use avr studio. I have a good sized arduino program that I want to port though so I'd much rather stick with the IDE.
also: how do i map which pin is where for the various processors?
Even though the 2313 has a UART, I don't think tiny cores uses it. Better check the code to be sure though.
For mapping the pins you have to change the TinyDebugSerial library code. Here's another thread discussing serial options: http://forum.arduino.cc/index.php?topic=207467.0
And I can get it to load by manually issuing the same command the ide was using changing its -c parameter from -cstk500v1 to -cavrispv2 based on reading the pololu programmer web site.
This is the entry in programmers.txt I used when I used the pololu programmer
pololu.name=Pololu USB AVR Programmer
pololu.communication=serial
pololu.protocol=avrispv2
edit:
and in boards.txt uncomment pololu programmer
# The following DO work (pick one)...
#attiny85at16e.upload.using=arduino:arduinoisp
# attiny85at16e.upload.protocol=avrispv2
attiny85at16e.upload.using=pololu
Thanks again for the help, software serial works fine at 57600 - now on to the spi bridge and memory challenges. For one thing I need a 256 byte input buffer!