Loading...
  Show Posts
Pages: [1]
1  Using Arduino / Microcontrollers / Re: Strange ATTiny85 behaviour on: April 19, 2012, 06:38:28 pm
Quote
It has three generally useful PWM pins (the fourth is inverted which makes it not-very-Arduinoish).
Looks like you're right, and I shouldn't trust google-image results without consulting a proper datasheet...

Quote
just a theory but maybe its running way too fast and glitching
is this a problem seen in the microcontroller world? even if I'm running at a documented clock-speed?

and finally, after tooling around a bit more today, I think what I'm seeing is the expected result. I didn't know how to fuse the attiny85 to run at 8MHz at first, so the code was originally written for the 1MHz speed. So when I run the same code at 8MHz I'm seeing a beat-frequency, not a flicker.
2  Using Arduino / Microcontrollers / Strange ATTiny85 behaviour on: April 18, 2012, 11:22:08 pm
After a fair bit of searching I'm still at a loss as to why I'm seeing this, but I'd swear my ATTiny85's are running faster at "1MHz" than at "8MHz".

I'm using an Olimex STK500v2 programmer, writing code in Arduino 1.0, and everything is working great. My first project is a mood-light, because RGB LEDs are cool, but of course ATTiny85 only has 2 PWM pins so I fake PWM the third color. When I "burn" the 8MHz-internal-oscillator bootloader and upload the program, it appears to be very choppy and running much slower than if I do the same with the 1MHz-internal-oscillator bootloader.

Any ideas why this is so?

If it helps at all, here's the programmer I added to programmers.txt:
Quote
olimexisp.name=AVR ISP 500 Olimex
olimexisp.communication=serial
olimexisp.protocol=stk500v2

...and here are the board definitions I added to the tiny's boards.txt:
Quote
attiny85at8oli.name=ATtiny85 @ 8 MHz  (Olimex, internal oscillator; BOD disabled)
attiny85at8oli.upload.using=olimexisp
attiny85at8oli.upload.maximum_size=8192
attiny85at8oli.bootloader.low_fuses=0xE2
attiny85at8oli.bootloader.high_fuses=0xD7
attiny85at8oli.bootloader.extended_fuses=0xFF
attiny85at8oli.bootloader.path=empty
attiny85at8oli.bootloader.file=empty85at8.hex
attiny85at8oli.build.mcu=attiny85
attiny85at8oli.build.f_cpu=8000000L
attiny85at8oli.build.core=tiny
##########
attiny85at1oli.name=ATtiny85 @ 1 MHz  (Olimex, internal oscillator; BOD disabled)
attiny85at1oli.upload.using=olimexisp
attiny85at1oli.upload.maximum_size=8192
attiny85at1oli.bootloader.low_fuses=0x62
attiny85at1oli.bootloader.high_fuses=0xD7
attiny85at1oli.bootloader.extended_fuses=0xFF
attiny85at1oli.bootloader.path=empty
attiny85at1oli.bootloader.file=empty85at1.hex
attiny85at1oli.build.mcu=attiny85
attiny85at1oli.build.f_cpu=1000000L
attiny85at1oli.build.core=tiny

Thanks in advance for any help!
Pages: [1]