Go Down

Topic: programming ATtiny surface mount chips (Read 309 times) previous topic - next topic

secretreeve

okay so i stumbled upon a thread a few days ago and now i cant find it.

anyway it made a mention of needing a ceramic capictor adding to the usual setup for programming the chips. this was in addition to the standard  10uf between ground and reset but the ceramic was placed elsewhere i think.

anyway, im looking to get clarification on this before i brick a chip as that would SUCK!

spycatcher2k

2 ceramic caps on the power lines +5v -> GND
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

secretreeve

2 ceramic caps on the power lines +5v -> GND
any specific value to use? and is that the chips 5v and gnd and the arduino 5v and gnd? not really too sure where the placement is from your post.

ShmuelGlick

I use the programmer attiny programmer from Sparkfun. It has all you'd need.

secretreeve

I use the programmer attiny programmer from Sparkfun. It has all you'd need.
i may have missed it, but all i can see on sparkfun is DIP package programmers not surface mount. also, no point on buying another programmer, i already have smd to dip adaptors just need to be sure on the ceramic capacitors

mu234

I use the programmer attiny programmer from Sparkfun. It has all you'd need.
Hi, can you post the picture or say more where this programmer can be bought?

Best.

spycatcher2k

Quote
say more where this programmer can be bought?
Really! Have you tried GOOGLE, or even SPARKFUN? When someone tells you it's the ayyiny programmer from spakfun, where did you expect to find it?

LINK FOR LAZY PEOPLE
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

DrAzzy

#7
Nov 20, 2019, 08:45 pm Last Edit: Nov 20, 2019, 08:55 pm by DrAzzy
I use a USBAsp programmer (though have had no problems with USBTinyISP or ArduinoAsISP - the only problem with the latter is that there are more wires to connect incorrectly), and a 2x3 ISP header on the board with the ATtiny on it. Any of those three programmers can be had (or made, in the case of arduino as ISP) for under $5 from ebay. Every time I have omitted an ISP header from a design, in the expectation of programming the parts before I solder them down, I've regretted it when I needed to change the firmware later. You don't need to actually install the pin header - you can stick 2x3 male pins into the connector on the controller, and hold in in place at an angle while programming, or use a 2x3 pogopin adapter.

For external components on a classic AVR (and, for that matter, the megaavr attinys), you need:

A 0.1uF ceramic cap between Vcc and Gnd. This should be located as close to the attiny as possible. If the part has more than 1 Vcc pin, ideally each should get a 0.1uF cap as close to the Vcc pin and it's adjacent Gnd pin as possible (though the length of the traces is typically not long enough that this is strictly necessary - most pro mini clones use only a single decoupling cap, for example). The t85 has only one Vcc pin, so only one decoupling cap is required.

If (and only if) you are using a part with an AVcc pin (most ATtinys do not have this, most ATmegas do), you need a 0.1uF cap on it like it's a Vcc pin.

If the wires from the power supply are long and/or the power supply is suspected to have poor transient response, include an additional capacitor between positive rail of supply (Either Vcc, or Vin if you've got a regulator on the board) and Gnd somewhere on the board. 10uF is generally a good choice here.

If you are using a regulator on the board, you must include capacitors on the input and output of the regulator, in addition to any others. The datasheet for the regulator will specify what kind of capacitors are suitable for this - some regulators are picky not only about the capacitance, but the ESR or capacitor type (which is short-hand for the ESR, as the ESR depends strongly on the type of capacitor).

If (and only if) you are using an external crystal as clock source (unlikely on the x5 series, more likely on parts with more pins), you need the crystal and appropriate loading caps (other side of loading caps goes to ground) on the crystal pins. You generally want the capacitance of the loading caps to be a few pF lower than the spec'ed capacitance of the crystal to allow for parasitic capacitance on the traces to the crystal. When using solderless breadboard, depending on the make and model of the breadboard, the parasitic capacitance alone may be sufficient for the crystal to work, and adding the loading caps may prevent it from working (resulting in it getting signature of 0x000000 after you "burn bootloader" to set fuses; in this case, the loading caps should be omitted (the loading caps are required when not using solderless breadboard). These must be placed as close as possible the crystal pins.

If you have long wires/traces on the Reset pin, put a 10K resistor between Vcc and Reset for noise rejection. If you are using the DTR auto-reset circuit to reset the part when a serial port is opened (eg, to enter a serial bootloader, or to restart the sketch from the beginning upon opening a serial port so you can see all the output), you also need this 10k resistor (but there should never be more than one such resistor).

If (and only if) you are using the DTR auto-reset circuit mentioned above, you also need a diode between Reset and Vcc (band towards Vcc), and a 0.1uF ceramic cap between DTR of adapter and Reset.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

secretreeve

Really! Have you tried GOOGLE, or even SPARKFUN? When someone tells you it's the ayyiny programmer from spakfun, where did you expect to find it?

LINK FOR LAZY PEOPLE

just as an fyi thats for dip packages, this thread is relating specifically to surface mount chips and the requirement for ceramic caps to program the surface mount vriations

DrAzzy

just as an fyi thats for dip packages, this thread is relating specifically to surface mount chips and the requirement for ceramic caps to program the surface mount vriations
Heh. A typical post from some of our forum regulars, huh?

As an aside, the 0.1uF decoupling cap is not needed specifically for programming; it is required for any sort of reliable operation. It is to counteract the inductance of the wires/traces supplying power to the chip as the current the chip can change dramatically on sub-microsecond timescale (when programming, for example, the current will spike when you erase a page of flash; during operation, something like blinking an LED with an I/O pin will produce a ~20mA step-change in the current consumption); the current flowing through any real conductor can only change at a finite rate. So the voltage across the chip will dip briefly, potentially by enough to cause a reset or hang.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up