Hi
I had made up Aaron Alai's Arduino EMF detector using ATtiny85 with charlieplexed LEDs, and recently I thought I'd bake a batch of SMD boards using that schematic (attached). On the through-hole version I never got the ISP to work, but didn't give debugging that too much effortas the DIP uC was socketed so I simply programmed it externally.
Now I've baked up a board and realise the reason the programmer isn't responding is because MISO, MOSI and SCK are connected via LEDs. So that's not going to work!
I was thinking the way to fix this is by having 3 solder jumpers to connect the charlieplex array once the thing is programmed, but thought I'd ask if there's a better way I've not thought of?
Thanks
Geoff
MOSFETs with the gates tied to RESET. When RESET is asserted (low) the MOSFETs isolate the target.
I found a bus switch that works well. It is basically an array of low voltage FETs. I believe it was limited to 20 mA per bit. It is surface mount.
If you increase the resistor values and connect the programmer directly to the target it may work. That worked well with a TLC5940 + ATtiny84 thing I made.
I do have several spare boards so might increase the resistor values to 1k to see if that sorts it without increasing the parts count. Something like the attached was my initial thought.
What is the usual clock setting for the target during programming? 8 MHz? 1 MHz? 125 kHz?
I normally set the ATtiny up as 8MHz, and that's my intention with this one. However this is presently at factory default (1MHz?) as I've not been able to communicate with it as yet.
What are you using for the programmer? Uno?
I'm using a USBtinyISP but also tried a USBasp. If there's benefit using a Uno I can.
The problem with most commercial programmers is that they have series resistors on the programming lines. In your case, this creates a voltage divider that is very likely interfering.
If there's benefit using a Uno I can.
In your case, there is a huge potential benefit. It can be the difference between "reliable" and "never works".
Update: using Arduino as ISP didn't resolve this with the existing board, but will bake one hopefully this weekend with 1k current limiting resistors on the charlieplexed LEDs and see if that responds better.
Thank you for the follow-up. I will recheck the schematic this afternoon.
Can't see any reason for it to not work. Any news?
If that's the case I'll check my connections and retry tonight. I won't get the oven setup until over the weekend to make a board up with higher value resistors though
Just to make certain there is no misunderstanding: I can't see any reason for it to not work with 1000 ohm resistors. The 120 ohm resistors are very likely too small (too much current).
I'll try to rework the board I've already made, but often this results in lifted pads. If that happens I'll get onto this on the weekend. Thanks for the clarification.
I'm pleased to report 1k did the job - thanks!
I returned to the USBtinyISP, and that worked first try and every time after that while I've tweaked the code around. Reliability does not appear an issue.
The LEDs are of course dimmer, but since that will stretch the coin cell life, I'm counting that as a bonus.
That has truly been a worthwhile exercise. Thanks, as always for your advice. Geoff
Glad you have it working!