Adventures in TinyAVR 1-Series

276 posts / 0 new
Last post

Pages

thefreeman
thefreeman's picture
Online
Last seen: 5 min 7 sec ago
Joined: 01/06/2020 - 09:56
Posts: 871
Location: France

There are more stable capacitors yes, X8L for example : 3% max change over 60°C. Though they still have initial tolerance, I see them at 10% from what Mouser has. Plus the DC bias, but that depends what value is needed. I suppose that battery voltage is something that could be accounted for since it’s known ?

Mike writes his own firmware.

Forsythe P. Jones
Offline
Last seen: 6 days 8 hours ago
Joined: 08/15/2021 - 00:40
Posts: 413
Location: California

IIRC the avr-1 has an internal RC clock that is calibrated at the factory. It’s still nowhere near as accurate as a crystal, but maybe it could be used to measure the OTC capacitance by timing the recharge when the light is turned on. Is accuracy better than 10% really needed to distinguish between a short and long press anyway? I’d expect short press < 150ms, long > 300ms, or something like that, where it’s ok for in-between measurements to not be definite. So 10% either way won’t matter.

I wonder if it’s possible to use the serial port as an accurate timebase to calibrate the other stuff while the chip is being flashed, since the baud rate will derive from a crystal clock in the USB gizmo. Maybe that gets too fancy if it is even doable, though. I’m presuming that putting an xtal onto the driver itself is not really feasible. It would be nice for some things, like turning on the light at a certain time of day. People do keep asking for that.

Mike C
Mike C's picture
Offline
Last seen: 2 days 21 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2582
Location: Sweden

Forsythe P. Jones wrote:
Do you mean you use ULP (32khz clock) literally all the time, and the Anduril UI still works? Is there a reasonable way to switch out of ULP at least some of the time, when more CPU is needed?

I use ULP all the time but with my own firmware, never tried Anduril. Switching clock is easy, not and issue for me unless I’m doing it during off press. So far I have not needed to switch clock from ULP but my firmware isn’t complete yet.

Forsythe P. Jones wrote:
IIRC the avr-1 has an internal RC clock that is calibrated at the factory. It’s still nowhere near as accurate as a crystal, but maybe it could be used to measure the OTC capacitance by timing the recharge when the light is turned on. Is accuracy better than 10% really needed to distinguish between a short and long press anyway? I’d expect short press < 150ms, long > 300ms, or something like that, where it’s ok for in-between measurements to not be definite. So 10% either way won’t matter.

No, it won’t matter but I don’t really care, OTSM works fine for me so I personally couldn’t be bothered with all the above.
Mike C
Mike C's picture
Offline
Last seen: 2 days 21 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2582
Location: Sweden

I can mention that my motivation to stick with OTSM is also due to the way my firmware is written. My firmware is for both off switch (clicky) and E switch (momentary), and it’s much easier to write support for this with OTSM because it’s “real time” press detection just like E-switch presses. With OTC the off presses have to by dealt with on light start up after each press while the E-switch presses are dealt with in real time, two totally different press interpretation methods which just complicates things, at least for me.

thefreeman
thefreeman's picture
Online
Last seen: 5 min 7 sec ago
Joined: 01/06/2020 - 09:56
Posts: 871
Location: France

thefreeman wrote:

BTW Digikey just received new stock of Attiny1616-MNR , currently has 1780 in stock.

And… they’re gone.
But they expect 6000 later this month and 36000 in October.

Edit : the 6000 lasted ~3 days, now they have 34800 in stock

Pages