ATtiny84-TinyCalibrator icon indicating copy to clipboard operation
ATtiny84-TinyCalibrator copied to clipboard

cost reduction/optimization options

Open nerdralph opened this issue 3 years ago • 2 comments

The t84 RC oscillator is much better than the t85 when it comes to stability and tuning resolution. Last year I wrote an improved OSCCAL tuning function for Micronucleus, that could be used in your calibrator project. https://github.com/nerdralph/micronucleus-firmware/blob/asm/firmware/osccal.S This issue thread has some details about the tuning: https://github.com/micronucleus/micronucleus/issues/182

This would also free up 2 pins on the t84, and one or both of them could be then used for a PWM-based charge pump instead of the external ST662.

nerdralph avatar Jan 31 '21 15:01 nerdralph

I mistakenly thought there was a USB connector on the back of the PCB, and the firmware was using V-USB. Since it's not, that makes the USB tuning suggestion pointless. I still think you can drop the external xtal though, by calibrating the t84's RC oscillator at programming time, if necessary. Since the t84 RC oscillator is more stable and has finer tuning resolution than the t13 and tx5, the tuning accuracy would not suffer by a material amount.

nerdralph avatar Jan 31 '21 15:01 nerdralph

I'm sure you're right, the crystal is a little overkill for this purpose. With the two pins you can do great things, for example realizing the 12V charge pump with the ATtiny and thus saving the ST662 or saving yourself this stupid pin sharing of the buttons and SCI line, which has caused me a lot of headaches (this was a really bad decision). Anyway, despite the many opportunities for improvement, the hardware does its job, so that a change is not on my priority list for the time being. The thing with the signature row is more important, I think.

wagiminator avatar Jan 31 '21 17:01 wagiminator