You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's supposed to be a simple RC switch and reads the PWM input from a RC receiver channel on Pin 3 and sets Pin 0 based on this.
This code works perfectly fine on an Arduino nano and also on an Attiny 45 with the dammelis Attiny core. But I would like to run it on an Attiny 13 using this core and it turns out the PWM reading is by factor 1.5 too high. I have used a servo tester to generate pulses between 800 and 2200us and sent the readings to a serial monitor and they are between 1200 and 3300us. Same issue occurs when I use the the above mentioned Attiny 45 with this core instead of the dammelis core. I have used the defaults and burned the fuses to the chip. I have also tried several other fuse combinations without success.
For now I've adjusted the 'if' statement to use 2700 instead of 1800us and it switches as intended when the input goes over 1800us.
Nevertheless, would be interested to know what I'm doing wrong
Thanks!
The text was updated successfully, but these errors were encountered:
Mmm. Probably not doing anything wrong, could just be a bug in my code :)
You could try changing the "Millis Accuracy" setting (Tools Menu) and see if that makes a difference. You could also try SpenceKonde's original ATTInyCore with a Tiny45 and see if that produces a better result there, Spence's doesn't support Tiny13, but it could narrow it down to something in my changes.
Many thanks for providing this Attiny core!
I'm experiencing an issue with this very simple code:
It's supposed to be a simple RC switch and reads the PWM input from a RC receiver channel on Pin 3 and sets Pin 0 based on this.
This code works perfectly fine on an Arduino nano and also on an Attiny 45 with the dammelis Attiny core. But I would like to run it on an Attiny 13 using this core and it turns out the PWM reading is by factor 1.5 too high. I have used a servo tester to generate pulses between 800 and 2200us and sent the readings to a serial monitor and they are between 1200 and 3300us. Same issue occurs when I use the the above mentioned Attiny 45 with this core instead of the dammelis core. I have used the defaults and burned the fuses to the chip. I have also tried several other fuse combinations without success.
For now I've adjusted the 'if' statement to use 2700 instead of 1800us and it switches as intended when the input goes over 1800us.
Nevertheless, would be interested to know what I'm doing wrong
Thanks!
The text was updated successfully, but these errors were encountered: