Go Down

Topic: Help with LED Lamp concept. (Read 6 times) previous topic - next topic

kculm



On the at85 I use 3,Red 0,Green 1,Blue.
Shuffle that red over to D4 and I think you'll have a better result.  The tiny core doesn't give you hardware PWM control on D3 so the effect of analogWrite() will be a harsh cut-over from OFF to ON.

Cheers ! Geoff


Thanks Geoff,  But I have a question. The diagram http://www.akafugu.jp/images/microcontroller-reference-sheet.png it show PIN 3 as PWM.  am I missing something as usual

thanks

kculm

all most there.

I have one last issue,  When I run it with out transistors on the Arduino it works smooth. But when I use 3, PNP transistors it works fine up until the Green to Blue transition. It almost dims out completely then flicker to blue.

You can see what I am talking about here.http://www.youtube.com/watch?v=on6Qf8OeYgg&feature=youtu.be  The first 45 sec our so is with out Transistors.  After a few sec of blackness it with transistors. 

Sorry for the poor video 

strykeroz




On the at85 I use 3,Red 0,Green 1,Blue.
Shuffle that red over to D4 and I think you'll have a better result.  The tiny core doesn't give you hardware PWM control on D3 so the effect of analogWrite() will be a harsh cut-over from OFF to ON.

Cheers ! Geoff


Thanks Geoff,  But I have a question. The diagram http://www.akafugu.jp/images/microcontroller-reference-sheet.png it show PIN 3 as PWM.  am I missing something as usual

thanks
it is. It's just not usable as one in the Arduino IDE.  use 4 and you'll be fine.
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

fungus

#18
Feb 20, 2013, 02:32 pm Last Edit: Feb 20, 2013, 02:35 pm by fungus Reason: 1

Thanks Geoff,  But I have a question. The diagram http://www.akafugu.jp/images/microcontroller-reference-sheet.png it show PIN 3 as PWM.  am I missing something as usual


There's a hardware limitation: Pin 3 can only output the inverse of pin 4, pin 4 is the 'true' signal.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

strykeroz



Thanks Geoff,  But I have a question. The diagram http://www.akafugu.jp/images/microcontroller-reference-sheet.png it show PIN 3 as PWM.  am I missing something as usual
There's a hardware limitation: Pin 3 can only output the inverse of pin 4, pin 4 is the 'true' signal.
While that's strictly true for the datasheet, in reply #38 of this thread on ATTiny85 and PWM Coding Badly explained that the inverted PWM output can't be used by the Arduino cores for ATTiny.  My own testing confirms this gotcha - that D3 is not able to use hardware PWM with the arduino-tiny core.  Software PWM like the tone() function works fine on all 5 of the standard ATTiny85 IO pins though, so there's an easy way around this limitation if you must use that leg.

Cheers ! Geoff


"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Go Up