Is there any particular reason that the core files for the attiny85 would object to my using a 10mhz external resonator?
The sketch in question doesn't use delay at all, and millis is only used for button debouncing,
easy enough to change the numbers to make things work right.
I need (ok, want) two 20khz or so PWM outputs (independant of each other, so using the two PWM registers to count only to 200 wouldn't work as it disables the second PWM pin), setting the prescaler to full blast at 8mhz gives me 15khz or so, 10.5mhz would give me 20khz on the PWM in theory.
It looks like it might be possible to user OCCAL (i think that's it, the calibration register) to wind the clock up that high, though at the sacrifice of EEPROM and flash writability in-sketch.
I'm definitely down for playing with the high speed timer
if that can get me 20-25khz pwm on two pins (and separate duty cycles on the two pins),
I've been trying to convince the 328 to do it, but I'm missing something.
Thanks for the specifics on that. Now I have something to play with while I wait for a couple $0.50 10mhz oscillators to show up (I need to make a digikey order anyway).
The OSCCAL datasheet page says that using OSCCAL to get >8.8mhz operation isn't recommended as it doesn't give the EEPROM enough time to write correctly in some cases
Also, a general thank you! for creating the port in the first place and jumping in to help us with odd stuff like this. It's appreciated!
Arduino Tiny ... so easy to install and use!
Is there any reason not to use...
If you're willing to learn about a new type of timer, timer 1 may give you what you need without resorting to a 10 MHz clock speed. Timer 1 was built for high-speed PWM.If you decide experiment with timer 1...• Locate and open the "core_build_options.h" header file• Change the INITIALIZE_SECONDARY_TIMERS #define to be "0" (without the quotes)• In the ATtiny85 section, change the TIMER_TO_USE_FOR_MILLIS #define to be "0" (without the quotes)• Timer 1 is now free to use as you please.
My millis are toooootally out to lunch,
It got rid of the whine in one of two fans tested so far, I call it a success!
(Oddly, millis behaves the same way regardless of whether I upload it with the board set to attiny85@8mhz or @1mhz, something weird there. Doesn't make a difference to me, but it's strange)
EDIT: I spent some time with OSCCAL, and got myself an absolutely perfect 25.5khz signal. It's running the core at 6.5-6.6mhz, right around the ATTINY15 compatibility speed amusingly enough.
First a disclaimer, I'm on Ubuntu 11.4, I don't know if that changes things or not.
Fuses are (manually) set to 8mhz internal operation, using the burn-bootload function wouldn't change them for some reason.
Yes, selecting 1mhz and 8mhz without burning a bootloader or manually changing fuses and then re-uploading an identical sketch doesn't change the behavior of millis.
Is there any documentation, example or post to point me to on using TinyDebugSerial?
If it matters, I will be using it with my Pololu USB Programmer as a serial monitor?
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16