Hans
Hans
I think[ this commit ](https://github.com/SpenceKonde/megaTinyCore/commit/70032b021a0d66764034ea8c0b0e1deef244517a)caused the regression. When I revert the changes of this commit pulsein works ok again. Though at the cost of breaking millis() as 3 other changes...
> Actually, never mind, compatibility comes first, so going for A Agree with you that's by far the best option, or you won't know whose code you are breaking.
I recognize your confusion, I had exactly the same. What you need to realize is that when not using Setup and Loop you are skipping the core initialization, which sets...
Looking again at your code it's probably not going to make a difference, as you don't use the 16/20MHz oscillator ``` CLKCTRL_MCLKCTRLB = CLKCTRL_PDIV_64X_gc | CLKCTRL_PEN_bm; CLKCTRL_MCLKCTRLA = CLKCTRL_CLKSEL_OSCULP32K_gc; ```...
So I think your 400ms comes from: **20MHz** (oscillator) / **64** (CLKCTRL_PDIV_64X_gc) / **2** (TCB_CLKSEL_CLKDIV2_gc ) / **65535** (TCB_TIMEOUT_VALUE) = **2.3 Hz**
The Attiny412 has 3 clock sources. 1a) The 16 MHz oscillator 1b) The 20 MHz oscillator 2) The 32.768 KHz Ultra Low Power Oscillator The choice between 1a) and 1b)...
Same problem here. Blocking or non blocking usage. Without a hardware UART's buffer, combined with a hardware inverter in front of it you will always miss too many frames to...
Unsure why yours does not work. I did almost exactly the same a while ago when I built a PPM to PWM converter based on a Attiny404 for a Teacher/Student...
You seem to set the IDE at a 202 not 402 