Hi,
I am using an ATTiny85 kickstarter board as an initial test to drive a backlight driver circuit.
My backlight driver pcb has pads to accept the ATTiny85 once programmed but at the moment is hooked to the kickstarted board with flying leads.
The breadboard lashup is powered by the host instrument which is also generating the varying control voltage, and works fine.
The software expects a varying DC voltage (brightness control) varying from 0.1 to 5V.
The ATTiny85 then generates a PWM output to drive a FET that controls the LEDs in the backlight.
Once the ATTiny is programmed, the only connections I am using on the Kickstarter board are +5v, GND, PB1 (PWM out) and PB4 (variable control voltage in). But several other pins of course are still connected to the kickstarter's on board USB components
All this works fine with the following software:-
However once I unsolder and transfer the ATTiny to my pcb, it fails to generate PWM output unless I disconnect the +5v and reconnect it again. PWM then starts and the backlight LED's light up and control as expected.
So;-
Why does the separate kickstarter board lashed to my driver board work at power up every time, yet when the ATTiny85 is transferred to my board with only +5v, GND, PB1 and PB4 connected does it not start up?
Does the ATTiny85 inspect the USB port at power on expecting the USB resistors/zeners/etc to be there, and fails if they are missing?
If so, is there a parameter I need to set in my software to make the ATTiny ignore this problem and just 'fire' up?
Well that's the crux of my question as my pcb has nothing connected to any of the pads/pins (where an ATTiny would sit) other than +5v GND PB1 and PB4.
Whereas a Kickstarter does!
I can connect wires between those pads on my pcb to the same pins on a kickstarter board and my board works every time.
If I take the ATTiny off the kickstarter board and solder it directly (to the same 4 pins) on my pcb, the ATTiny doesn't start unless I jiggle the +5 off and immediately back on.
So
All the circuitry on my board doesn't change in either scenario, but my PB1 doesn't have a LED on it (like on the kickstarter). My PB3 doesn't have resistors and a zener (like on the kickstarter) and My PB4 doesn't have a resistor and zener on it( like kickstarter).
Either the ATTiny will only work on my board suspended on long wires, or the additional circuitry on the USB lines on the kickstarter board are making a difference.
Dave
At the bare minimum, a 100 nF ceramic bypass capacitor is required between Vdd and GND, located as close to the pins as possible.
Check for proper solder joints, with no bridging connections, and connecting wires for continuity.
It could be that the ATtiny external reset pin (PB5/RESET) is enabled, in which case a 100 nF capacitor and a 10K pullup resistor should be added to the pcb. Otherwise, disable the fuse.
HI,
My board is only 38mm x 28mm and has plenty of 100nF decoupling caps on the supply especially next to the VCC/GND.
Maybe the 10k/100nF reset addition is what I'm looking for to force a delayed reset as the power comes up, seeing as momentarily removing the +5V fixed the problem?
Though all the schematics of the 'kickstarter' board I have found don't have this installed?
It's a bit of a mystery as it's the same ATTiny85 in both cases, firstly on the kickstarter board and then physically moved to my board with no software changes.
Dave.
I've been measuring voltages around the kiskstarter board from which I have removed the ATTiny85.
I have found that one of the USB lines has +3V on it which correlates to PB3.
So my PB3 is totally unconnected to anywhere (I only have PB4 and PB1 connected to my project) whilst the kickstarter has a 1k5 from +5V and then a 3V zener to GND.
What does the ATTiny make of the USB lines during boot (ie power on) does it expect a logic 1 (one) on PB3 when not connected to a USB cable?
And......
Why does a momentary disconnection of the +5v to my board start it working perfectly?
Dave
So, I think I have found the problem but this has posed a new quandary.
The problem is indeed the USB network on PB3 as I suspected.
I just connected my floating ATTiny85 pin2 (PB3) to the PB3 pad on the kickstarter board I had just removed the ATTiny from. I connected the power and GND of the kickstarter board to my board as well.
Hey presto my board now starts at power up.
I then removed these new connections and just hooked a 10k resistor from PB3 to +5V and again my board now works as designed.
So the solution is:-
PB3 CANNOT be left floating! it has to be pulled up to 5V.
I now have found that the ATTiny85 has SELECTABLE (in software) internal pullups which I guess I don't have enabled on PB3. This would clearly alleviate any hardware changes and fix my issue.
My problem now is, that selecting these pullups seems to be "top secret" as I am struggling to find how to implement them?
PLEASE tell me how to select internal pullups.........
Thanks in anticipation
Dave