There is support for the t861, t13, t85, and t84 processors but it is not complete. Expect to find bugs and things missing.
If you have a request, please post it here. More requests = higher priority.
If you have a question, please post it here.
If you find a bug, please post it here.
There are two goals with this core: smaller and configurable. To accomplish the first goal, there are generally two versions for every Arduino function. An inline version and a normal version. The inline version is used when key parameters are constants. The normal version is used otherwise. pinMode is a perfect example. If the two parameters are constants, pinMode reduces to one or two machine instructions. If pin is constant, pinMode typically reduces to fewer than six machine instructions.
The "variants" feature is used to configure the core. A file named tc_build_options.h is created under a new variant. Here's the tc_build_options.h for the "standard" variant... http://code.google.com/p/arduino-tiny/source/browse/variants/standard/tc_build_options.h?repo=core2
By changing various #defines the core can be modified to support different applications. For example, it is possible to move millis to the watchdog timer. This allows timer 0 to be used as you please. Or, the default prescaler can easily be changed to increase the PWM frequency.
@hiduino, @Erni, @leo72, and anyone else who wants to work with the ATtiny861 family, I have a specific request. Please...
• Download and install the new core.
• Download and install Tiny Tuner 2 (it's a library).
• Try uploading and running the following sketch; you will have to use TinyISP with it configured to output a tuning signal.
#include <TinyDebugKnockBang.h>
#include <TinyTuner2.h>
static const uint8_t NO_PIN = (uint8_t)(-1);
static const uint8_t TogglePin = NO_PIN; // 3;
static void OutputOSCCALAssignment( void )
{
Debug.print( F( "\r\n\r\n // Add the following line of code to the top of setup...\r\n OSCCAL = 0x" ) );
TinyTuner2.tune();
Debug.print( OSCCAL, HEX );
Debug.println( F( ";" ) );
// delay( 2500 );
_delay_ms( 2500 );
}
void setup( void )
{
Debug.begin( 250000 );
if ( TogglePin != NO_PIN)
{
digitalWrite( TogglePin, HIGH );
pinMode( TogglePin, OUTPUT );
}
Debug.print( F( "\r\n\r\n // Initial value of OSCCAL is 0x" ) );
Debug.print( OSCCAL, HEX );
Debug.println( F( ";" ) );
_delay_ms( 1000 );
OutputOSCCALAssignment();
}
void loop( void )
{
OutputOSCCALAssignment();
}
I downloaded and installed the new Tiny Core 2 (a little headache before to understand that you named the file boards.txt to another thing... ). Then I used it to set the fuses to 8 MHz. Then I compiled and uploaded the BlinkWithoutDelay sketch.
Everything was perfect.
if you explain me how to do the test you requested.... what's TinyISP? How do I have to use it?
It is a replacement for ArduinoISP.
One of the great features is that it use the MISO line to communicate, so you don't have to use a Serial/USB converter every time you want to have debugging output
// Initial value of OSCCAL is 0xAD;
// Add the following line of code to the top of setup...
OSCCAL = 0xA9;
t861A @ 8MHz:
// Initial value of OSCCAL is 0xAD;
// Add the following line of code to the top of setup...
OSCCAL = 0xA9;
// Add the following line of code to the top of setup...
OSCCAL = 0xAA;
I downloaded and installed the new Tiny Core 2 (a little headache before to understand that you named the file boards.txt to another thing... ).
The intent is for you to maintain your own boards.txt. That way you can keep the list as short or as long as you want and you don't need to worry about an update overwriting any changes you make.
Then I used it to set the fuses to 8 MHz. Then I compiled and uploaded the BlinkWithoutDelay sketch. Everything was perfect.
Excellent!
if you explain me how to do the test you requested.... what's TinyISP? How do I have to use it?
I was still on the old version. I needed to refresh it. I think it will be convenient to have it included, unless one wants to use it with other cores. I guess it will be more flexible as a library.
Ok. I remembered myself to look at this thread too late... sorry
Just a couple of questions:
the Tiny 2 core is, at this stage, a complete replacement of the original Tiny core or not?
at this stage, is the Tiny 2 core supporting almost the most important features of the AttinyX61 family (I mean digital read/write, analog read, timers, interrupts)?
I'll try to add the support for the AttinyX61 MCUs in my libraries (swRTC, leOS/leOS2, looper and analogComp)
the Tiny 2 core is, at this stage, a complete replacement of the original Tiny core or not?
No.
I'm working on a Google Spreadsheet that summarizes the status.
at this stage, is the Tiny 2 core supporting almost the most important features of the AttinyX61 family (I mean digital read/write, analog read, timers, interrupts)?
These should be working...
millis
digitalRead( constant )
digitalWrite( constant )
analogRead( constant )
I'll try to add the support for the AttinyX61 MCUs in my libraries (swRTC, leOS/leOS2, looper and analogComp)
Excellent. If you run into anything missing or anything you believe would be better placed in the core just let me know.