Go Down

Topic: ATTINY 84 in Arduino IDE on a UDOO: Nothing shows up in "Programmer" section (Read 314 times) previous topic - next topic

DrAzzy

Upload Arduino as ISP sketch, then put a 10uf cap between reset and ground on the arduino being used as the programmer (to disable autoreset, else it will reset and we'll be talking to the bootloader instead and nothing will work), connections are SCK, MISO, MOSI on programmer to SCK,MISO,MOSI on target, pin 10 on programmer to RESET on target.

There is an open issue to improve the documentation in my core and add stuff like that, but I'm not really able to do it myself; I don't like writing tutorials, and I'm not very good at it either.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

CrossRoads

Crystal not needed if using internal RC oscillator
Aref cap not used if pin being used for digital
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

glatteis

Upload Arduino as ISP sketch, then put a 10uf cap between reset and ground on the arduino being used as the programmer (to disable autoreset, else it will reset and we'll be talking to the bootloader instead and nothing will work), connections are SCK, MISO, MOSI on programmer to SCK,MISO,MOSI on target, pin 10 on programmer to RESET on target.

There is an open issue to improve the documentation in my core and add stuff like that, but I'm not really able to do it myself; I don't like writing tutorials, and I'm not very good at it either.
I only have 100µF and 0.1µF and below caps. Will the 100µF one work or do I have to chain 10 of them to achieve exactly 10µF? :P
EDIT: My math is off here, it would be 4 caps to achieve 12.5µF

DrAzzy

100uF is fine for disabling autoreset.

DTR is coupled to the reset like with a 0.1uf cap (and pulled up to vcc with a 10k resistor, forming the RC that converts the transition from high to low on DTR to a brief pulse low on reset). You need to keep reset above 0.9*Vcc to guarantee it doesn't reset; anything 1uF or above in theory should work. Using 10uF or more gives you enough margin to be confident that it's not going to reset.

As an aside, you can't make a 10uF cap from 10 100uF caps or 10 0.1uF caps. You'd need 100 0.1uF caps ;-).

Also, "exactly"? These are real capacitors (as opposed to imaginary ideal ones from an EE textbook) - most are +/- 20%. Many electrolytics have even wider tolerances than that.

Finally, might I suggest you look on ebay for "capacitor assortment"? They're not very expensive, and it's good to have a selection of caps to choose from; I'd pick up a kit with 1uF and up in electrolytic - smaller electrolytics aren't terribly useful. If your selection of ceramics is poor, I'd also get an assortment of ceramics that goes up to 10uF; if you do already have a good selection of ceramics, I'd still recommend snagging a few 10uF and 4.7uF ceramics - they're useful for wiring up regulators, since many regulators specify a specific type of cap in the datasheet). If you don't have a resistor assortment yet, can get that too on ebay for dirt cheap too.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

CrossRoads

I find most Cap and Resistor packs to be mostly useless for digital electronics. Too many values that would only get used if doing analog stuff.
Go to a site like Dipmicro.com or taydaelectronics.com and pick up 100 of the typical values:
220 ohm
1K
2.2K
5K
10K

22pF
0.1uF
1uF
3.3uF
10uF
47uF
100uF

and some 16 MHz crystals too.
That should last a little while and do most of what you need.
Maybe some buttons/switches, LEDs, small schottky diodes, whatever else strikes your fancy.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

glatteis

MISO, MOSI and SCPK are male headers on the UDOO and I need female jumper wires to connect to them

glatteis

As an aside, you can't make a 10uF cap from 10 100uF caps or 10 0.1uF caps. You'd need 100 0.1uF caps ;-).
Isn't capacity antiproportional to length in plate capacitors? So if you put two plate capacitors behind each other you basically create a capacitor that is double the length, so half the capacity

glatteis

Nothing really works here. I've put the Arduino as ISP sketch onto my UDOO, I've defined USE_OLD_STYLE_WIRING for my PWM outputs. I've also defined #define SERIAL SERIAL_PORT_USBVIRTUAL so I don't have to worry about autoreset on my Due.

I've also tried about every other combination with and without the capacitor.

I have wired 3V3 to VCC, GND to GND, 0.1µF capacitor between GND and VCC, PWM10 to RESET, PWM11 to MOSI, PWM12 to MISO, PWM13 to SCK, and I've also wired up the three status LEDs. Heartbeat works.

Everytime I try to upload the bootloader I get

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03

:(

EDIT: It's probably down to which programmer I have selected. I don't know which one to select.

glatteis

Holy Shit

it worked

The thing that absolutely nobody told me is to select the Programer "AVR ISP" when uploading the AVR sketch and then "Arduino as ISP" when uploading the sketch to the ATTiny.

I wasted 5 hours of my life on this. Worth it though.

The community is incredibly helpful despite of the lacking documentation! Thanks for your support!

glatteis

Because someone else might run into this problem, here is a complete run-down of what you have to do:

0. Install ATTiny Core as instructed.

1. Connect the Due to the Attiny 84 like this. Source: 42bots.com. Yes, the MISO, MOSI etc. ports of the Due are somewhere else, but don't worry about it, connect the PWM ports as instructed.
If you want, you can also attach LEDs (with resistors) to PWM ports 7,8,9 for progress,error,heartbeat indication. You can also put the cap that is instructed in the ATTiny Core "Wiring" documentation but for the ATTiny 84 it also worked without it.

2. Load up the Arduino ISP sketch from File->Examples->Arduino ISP. If you have a Due, scroll down and find these lines:
// Uncomment following line to use the old Uno style wiring
// (using pin 11, 12 and 13 instead of the SPI header) on Leonardo, Due...

// #define USE_OLD_STYLE_WIRING

Uncomment the last line, now it should be

#define USE_OLD_STYLE_WIRING

3. Go down a bit more to

#ifdef SERIAL_PORT_USBVIRTUAL
#define SERIAL SERIAL_PORT_USBVIRTUAL
#else
#define SERIAL Serial
#endif

If you have a Due: Either you don't use the capacitor between GND and RESET (I didn't try that) OR you delete all of these lines and write

#define SERIAL Serial

instead. Put the cap on in step 5 this case (this is what I did).

4. Under Sketch, select your Arduino as a Board. IMPORTANT: Select "AVR ISP (ATTiny)" as Programmer! Otherwise nothing will work. Upload the Arduino as ISP sketch.

5. Connect the capacitor between GND and RESET if you have used the second option in step 3.

6. Open your Blink sketch or whatever you want to run on your ATTiny, select your ATtiny as Board and set all of your other settings how you like them, and IMPORTANT: change the Programmer to "Arduino/Leo as ISP (ATTiny)".


glatteis

The same thing that worked yesterday doesn't work anymore today and throws me the same error as before.

I'm really frustrated by this. Apparently it's just luck if the upload works or not.

glatteis

I tried it again, and it works with exactly the same configuration and wiring. Huh.

Go Up