Releases: SpenceKonde/megaTinyCore
2.2.4 - Fix serial-adapter UPDI via board manager,
Also some assorted documentation fixes, cleanup of tinyNeoPixel library, and a baud-rate calculation fix for the I2C library from the official Arduino core... but now, at long last, the new programming functionality - I think - has arrived for those installing via board manager!
It should be available through board manager shortly!
2.2.3 - Add support for MPLAB SNAP and PICkit4 programmers
Realized that while the avrdude version we pull in supports these, they were missing from programmers.txt - wanted to get this into a release before I turn my attention to DxCore.
2.2.2 - Critical bugfix for 2.2.x
Critical bugfix for board manager and cli installation on linux/unix platforms only. Windows and manual installations are unaffected.
2.2.1 - Critical bugfix for 2.2.0
In 2.2.0 I got the "upload" and "program" recipes mixed up. This resulted in Optiboot boards not uploading at all, and the new writing of safe fuses (most importantly the OSCCFG one) not happening. This release fixes that problem.
Note that we are now only doing one "release" per version.
The link that GitHub calls "source code" is the manual installation version (megaTinyCore-2.2.1-manual.tar.gz), while megaTinyCore-2.2.1.tar.gz, attached, is the board manager version.
2.2.0 - UPDI programming with just a serial adapter!
This is a huge release.
Undoubtedly the most exciting change is the addition of support for programming using just a serial adapter with a 4.7k resistor between Tx and Rx (many serial adapters already have a 1k resistor in series with Tx - in that case you'll want to connect a lower value resistor to total around 4.7k). Connect Rx to the UPDI pin, Vcc, and Ground and the new programmer option... and there you have it. And you don't have to fight with the strange problems that seem to plague jtag2updi, either.
Additionally, now, when uploading a sketch via UPDI, all "safe" fuses that are configured by a tools submenu (that is, those that could not result in the board being difficult to recover - namely BODCFG (setting BOD level higher that voltage you are running the device at) or SYSCFG1 (which is where UPDI vs Reset is selected - also unfortunately where EESAVE is). The main benefits are that you don't have to burn bootloader to change between 20-MHz-derived and 16-MHz derived clock speeds (a very frequent point of confusion). Al
Since fuses cannot be set through the bootloader, though you do still need to burn bootloader to change this if you are using Optiboot; options which require "burn bootloader" say so in the tools menu. Uploading through UPDI (with optiboot or non-optiboot option selected) always erased the bootloader (like classic AVRs) - but now the BOOTEND fuses also get set to match what is being uploaded, so at least the sketch will run.
Added digitalWriteFast() and digitalReadFast() - these take the same arguments as the normal version of these functions (though they do not do anything fancier than changing the output value; digitalWriteFast() doesn't switch the pullups on and off if the pin is input or turn off PWM), and the pin number must be a constant known at compile time (otherwise it is a compile error) - but it is lightning fast, optimizing down to a single instruction! Speaking of digitalWrite() related stuff digitalWrite() on an INPUT will also set the pin's OUT value, emulating the behavior of classic AVRs which a lot of code relied on
The Servo library now works correctly.
PWM on the pins controlled by TCD0 now works again (20 and 24-pin 1-series parts only)
Corrected PWM duty cycle calculations on TCD0 pins (they were slightly off, though barely noticable in most circumstances.
New special feature on the TCD0 pins only: analogWrite(pin,255) results in a steady high, and analogWrite(pin,0) a steady low - but without the brief glitch from stopping the timer for a few cycles. digitalWrite() on those pins will fully disconnect them from the timer (which does cause the glitch, of course).
On all PWM pins, reduced the potential for a momentary glitch when turning off PWM.
A lot of functions will now give a compile error if passed arguments which are constants, and not valid - such as writing to a non-existent pin, trying to set DACReference(VDD);
, and so on. If it's not a constant, we can't catch it for you - but where we know that what you're doing is not going to work...the core will now try to point it out to you.
Enjoy!!
The "Source Code" link below is the manual installation version, megaTinyCore-2.2.0.tar.gz is the board manager version.
2.1.5 - critical bugfix for 2.1.4
Fix for #256 - burn bootloader failed on all boards other than the 14-pin non-optiboot one when an internal clock derived from 16 MHz was selected (any speed other than 5/10/20 MHz).
Board manager version
2.1.5 - critical bugfix for 2.1.4
Fix for #256 - burn bootloader failed on all boards other than the 14-pin non-optiboot one when an internal clock derived from 16 MHz was selected (any speed other than 5/10/20 MHz).
2.1.4 - Major Serial improvements, lots of significant fixes!
Right on the heels of 2.1.0, we have some changes that initially started as the small addition of U2X support to Serial, because I happened to need it... but before I knew it, I'd reworked that class in a major way... Flash use is significantly lower, particularly on small chips, where the OSCERR sigrow correction is dropped to save a significant amount of flash (it was never truly necessary anyway - but we still do it on parts with more than 4k flash, where we aren't hurting for every instruction word of flash we can get our hands on) - we also no longer apply the correction when using external clock, as in that case it is an incorrection, not a correction... It also no longer messes with interrupt priority, saving a significant amount of flash and preventing a few hairy situations. In my tests, it seems to work. A critical issue with 2.1.x that broke alternate serial pins is also fixed now. Version defines should be wrong less often moving forward, as that logic has been moved to one place in platform.txt. the build.board changes that caused some problems in the previous release now have backwards compatibility defines (though we strongly recommend testing for MEGATINYCORE, not the ARDUINO_attinyxy* defines). All options are now available for SUT, now too. A few other boards.txt bugs are also fixed. I had a chance to try out the external clock - I could hit 32 MHz with it, even at surprisingly low voltages, though glitches on the voltage could break it. at the lower end of supply voltages! Oh - and users of I2C slave mode will be happy to hear that we have a fix for a timing issue thanks to @raspy135 - they encountered it when using an ESP32 as the master.
So get this loaded up and start reporting all the new bugs I have surely introduced!
This is the version for manual installation.
2.1.4 - Major Serial improvements, lots of significant fixes!
Right on the heels of 2.1.0, we have some changes that initially started as the small addition of U2X support to Serial, because I happened to need it... but before I knew it, I'd reworked that class in a major way... Flash use is significantly lower, particularly on small chips, where the OSCERR sigrow correction is dropped to save a significant amount of flash (it was never truly necessary anyway - but we still do it on parts with more than 4k flash, where we aren't hurting for every instruction word of flash we can get our hands on) - we also no longer apply the correction when using external clock, as in that case it is an incorrection, not a correction... It also no longer messes with interrupt priority, saving a significant amount of flash and preventing a few hairy situations. In my tests, it seems to work. A critical issue with 2.1.x that broke alternate serial pins is also fixed now. Version defines should be wrong less often moving forward, as that logic has been moved to one place in platform.txt. the build.board changes that caused some problems in the previous release now have backwards compatibility defines (though we strongly recommend testing for MEGATINYCORE, not the ARDUINO_attinyxy* defines). All options are now available for SUT, now too. A few other boards.txt bugs are also fixed. I had a chance to try out the external clock - I could hit 32 MHz with it, even at surprisingly low voltages, though glitches on the voltage could break it. at the lower end of supply voltages! Oh - and users of I2C slave mode will be happy to hear that we have a fix for a timing issue thanks to @raspy135 - they encountered it when using an ESP32 as the master.
So get this loaded up and start reporting all the new bugs I have surely introduced!
This is the version for board manager installation.
2.1.3 - Another set of fixes
2.1.0 didn't go particularly smoothly did it? 2.1.3 fixes two serious regressions impacting 8-pin parts.
This is the version for manual installation.