Someone gave me an Adafruit Trinket. It's the original Trinket, which is 5V, and has an ATTiny85 processor. But is has a live USB port, and requires installing the Adafruit USB driver, and I think it uses special software to flash new firmware. I really don't want to go down that road, and wondered if I could just cut the traces going from the USB data pins, and then flash it like a normal ATTiny85 board. I've found a "tuning" Optiboot bootloader which allows for calibrating the internal oscillator to exactly 8 MHz, and thereafter it should flash normally with an FTDi USB adapter. Theoretically.
Can anyone think of a reason not to do that?
It should work ok, I think.
Thanks. When my Nano clones arrive from Banggood, I'll give it a try and report back. Any day now.
Yeah - reprogram via ISP to load the bootloader, and then you can use that.
I have found that at 3.3v~5v at room temperature, every AVR I have tried (except tiny 828, 841, 441, 1634, which have a different internal oscillator) is close enough to 8MHz for serial to work (even though the datasheet doesn’t guarantee it - and surely at extreme temperatures it wouldn’t be. But you need to tune at operating voltage and temperature… so if you tuned it at room temperature and then put it in a snowdrift, it would no longer be running at the right speed)- so tuning is usually not necessary. That’s why my ATTinyCore doesn’t include “tuning” bootloaders.
Yes, it always seemed to me that the maximum 10% variance of the internal oscillator was pretty unlikely to ever be experienced. And for my personal use, it would be a simple enough thing to flash firmware to each ATTiny that would turn a port pin high and low every millisecond or whatever, and let my scope tell me what the frequency actually is.
But if the oscillator is actually too far off, then you really do need to have the fix in the bootloader if you're going to do any UART stuff. I ran across sleemanj's tuning bootloaders. He says they still fit in 512 bytes.
But I'm still waiting for my Nanos to come in, so can't play with this just yet.