leo72:
Is there an option to move millis to timer 1, like on the actual Tiny core?
There is now. Instructions...
• Download the update...
http://arduino-tiny.googlecode.com/files/tiny-core-2-0100-0002.zip
• Navigate to the {SketchbookFolder}/hardware/tiny2/variants/ directory
• Create a new folder named leo72
• Navigate to the standard ( {SketchbookFolder}/hardware/tiny2/variants/standard/ ) directory
• Select and copy the tc_build_options.h file
• Navigate to the leo72 ( {SketchbookFolder}/hardware/tiny2/variants/leo72/ ) directory
• Paste the tc_build_options.h file into the leo72 directory
• Open the tc_build_options.h file in your favourite text editor
• Locate the following section, remove the comment from the #define, save the file, close the text editor
/*=============================================================================
Which timer should be used for millis
=============================================================================*/
#define TC_TIMER_TO_USE_FOR_MILLIS 1
• Navigate to the {SketchbookFolder}/hardware/tiny2/ directory
• Open the boards.txt file in your favourite text editor
• Locate a ATtiny861 board entry that most closely matches the settings you want. For example, I will be working with the attiny861at8 entry.
• Select and copy the entire board entry
• Navigate to the bottom of the file and paste
• Change the the keyword of the new section to something unique. For example, I changed attiny861at8 to leo72.
• Change the board name to something descriptive. For example, I changed u ATtiny861 @ 8 MHz (internal oscillator; BOD disabled)[/u] to Leo's Test.
• Change the BOARD.build.variant value to leo72. For example, I changed leo72.build.variant=standard to leo72.build.variant=leo72.
• This is my complete example...
################################################################################
leo72.name=Leo's Test
#------------------------------------------------------------------------------#
# The following programmers DO work (pick one)...
#
leo72.upload.using=arduino:arduinoisp
# leo72.upload.using=arduino:usbtinyisp
# leo72.upload.protocol=avrispv2
# leo72.upload.using=pololu
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# The following programmers do NOT work...
# leo72.upload.using=avrispv2
# leo72.upload.using=Pololu USB AVR Programmer
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Fuse settings and processor speed...
#
# Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default value
#
# Brown-out detection disabled; [BODLEVEL=111]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]
# Serial program downloading (SPI) enabled; [SPIEN=0]
leo72.bootloader.low_fuses=0xE2
leo72.bootloader.high_fuses=0xD7
# The extended fuse always reads back as 0x01 on my ATtiny861. Only bit 0 is defined so we'll just use 0x01.
# leo72.bootloader.extended_fuses=0xFF
leo72.bootloader.extended_fuses=0x01
leo72.build.f_cpu=8000000L
# rmv leo72.bootloader.path=empty
# rmv leo72.bootloader.file=empty85at8.hex
# rmv? fix? leo72.bootloader.unlock_bits=0xFF
# rmv? fix? leo72.bootloader.lock_bits=0xFF
leo72.build.mcu=attiny861
leo72.upload.maximum_size=8192
leo72.build.core=tiny
leo72.build.variant=leo72
# leo72.build.core=empty
#------------------------------------------------------------------------------#
# From the factory values (for reference)...
# avrdude: Device signature = [fix]
# avrdude: safemode: lfuse reads as 62
# avrdude: safemode: hfuse reads as DF
# avrdude: safemode: efuse reads as 01
#------------------------------------------------------------------------------#
################################################################################
• Save the file and close the text editor
• Start the Arduino IDE
• Ensure the new board is selected
• Execute Tools / Burn Bootloader to ensure the fuses are correct
• Enjoy!