Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RC Calibration is off for some people? #1

Open
nopdotcom opened this issue Apr 23, 2016 · 2 comments
Open

RC Calibration is off for some people? #1

nopdotcom opened this issue Apr 23, 2016 · 2 comments
Assignees

Comments

@nopdotcom
Copy link
Owner

From dasaki at https://forum.openwrt.org/viewtopic.php?pid=319315#p319315 :

I had problems detecting the an tiny RTC (DS1307) via the tiny-usb-i2c/LitteWire. After some trials it worked when I changed the clock calibration settings in main.c:

removing the "0.5" from line:

int         x, optimumDev, targetValue = (unsigned)(1499 * (double)F_CPU / 10.5e6 + 0.5);

to:

int         x, optimumDev, targetValue = (unsigned)(1499 * (double)F_CPU / 10.5e6 );

Hope it helps someone else.

@nopdotcom
Copy link
Owner Author

It looks like there has been a bunch of work on this since I last poked at it.

It is claimed FunkUSB (https://www-user.tu-chemnitz.de/~heha/viewzip.cgi/basteln/PC/FunkUsb/FunkUsb.zip/FunkUsb/com/ ) continually recalibrates through some kind of timer method.

micronucleus/micronucleus#26 goes through a lot of detail on how calibration currently works on ATtiny85, and @embedded-creations says “...also surprised the default routine works at all.”

@nopdotcom
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant