Go Down

Topic: help with programming ATTINY13a (Read 23862 times) previous topic - next topic

That1guy99

its all in the title.
I have IDE 1.0 and downloaded this:  https://sourceforge.net/projects/ard-core13/
it installed at C:\arduino\arduino-1.0.1\hardware\arduino\cores/core13

and put this in my boards.txt
Code: [Select]
################################################################

attiny13.name=Attiny 13A standalone

attiny13.upload.using=arduino:arduinoisp
attiny13.upload.maximum_size=1024
attiny13.upload.speed=19200

attiny13.bootloader.low_fuses=0x7B
attiny13.bootloader.high_fuses=0xFF
attiny13.bootloader.path=empty
attiny13.bootloader.file=empty

attiny13.bootloader.unlock_bits=0xFF
attiny13.bootloader.lock_bits=0xFF

attiny13.build.mcu=attiny13a
attiny13.build.f_cpu=128000
attiny13.build.core=core13

################################################################

attiny13int.name=Attiny13 @ 128 KHz (internal watchdog oscillator)
attiny13int.upload.using=arduino:arduinoisp
attiny13int.upload.maximum_size=1024
attiny13int.upload.speed=250 # important for not losing connection to a slow processor
attiny13int.bootloader.low_fuses=0x7B
attiny13int.bootloader.high_fuses=0xFF
attiny13int.bootloader.unlock_bits=0x3F
attiny13int.bootloader.lock_bits=0x3F
attiny13int.build.mcu=attiny13
attiny13int.build.f_cpu=128000
attiny13int.build.core=core13

###############################################################

attiny13at4.name=ATtiny13 @ 4.8MHz (internal 4.8 MHz clock)
attiny13at4.upload.using=arduino:arduinoisp
attiny13at4.bootloader.low_fuses=0x69
attiny13at4.bootloader.high_fuses=0xff
attiny13at4.upload.maximum_size=1024
attiny13at4.build.mcu=attiny13
attiny13at4.build.f_cpu=600000
attiny13at4.build.core=core13
###############################################################

attiny13.name=ATtiny13 @ 9.6MHz (interne 9.6 MHz clock)
attiny13.upload.using=arduino:arduinoisp
attiny13.bootloader.low_fuses=0x7a
attiny13.bootloader.high_fuses=0xff
attiny13.upload.maximum_size=1024
attiny13.build.mcu=attiny13
attiny13.build.f_cpu=1200000
attiny13.build.core=core13
###############################################################



Also hooked up the wires correctly to the attiny13a as shown here http://www.youtube.com/watch?v=p-fieBPj9Ng&feature=related

in the IDE I switched the board to attiny13(tryed all of the different attiny options with same result)
then selected tools/programmer and set it as arduino ISP
I use this code for testing it

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
*/

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 4;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}


and EVERYTIME I upload it I get this:
avrdude: stk500_getsync(): not in sync: resp=0x00

can somebody please tell me what I am doing wrong? its been driving me crAzy for 3 days now. I really would like some tips or help as to what is wrong.

thnks:)

That1guy99


spcomputing

I know, it is a silly question, but did you "Burn Bootloader" for the ATTiny setup you want?  There is no actual bootloader, but it will set the fuses and such.  I have only done this once with an ATTiny, but I remember running at 5 MHz (4.8 actual) range internal. 

If none of those work, I will setup a "Tiny Project" and see how that library behaves.

nickgammon

Can you provide a clear photo of your wiring please?

Then try running the sketch described here on your Uno:

http://www.gammon.com.au/forum/?id=11633

Judging by the video the wiring should stay the same. Please post the results you get.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

strykeroz

Hi

Since you're using the Uno, have you added a 10?F capacitor between the RESET and GND to prevent the automatic reset?  In the video you embedded he's not using a uno, so he doesn't do that.

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

That1guy99

Quote
have you added a 10?F capacitor between the RESET and GND to prevent the automatic reset?

I still get the same error: avrdude: stk500_getsync(): not in sync: resp=0x00

Quote
but did you "Burn Bootloader" for the ATTiny setup you want?  There is no actual bootloader, but it will set the fuses and such.  I have only done this once with an ATTiny, but I remember running at 5 MHz (4.8 actual) range internal. 


avrdude: stk500_getsync(): not in sync: resp=0x00 I dont know why its doing that but thats what it says:/

Quote
Can you provide a clear photo of your wiring please?

Then try running the sketch described here on your Uno:

http://www.gammon.com.au/forum/?id=11633

Judging by the video the wiring should stay the same. Please post the results you get.


I rewired my attiny13a as described in your link just to verify it was right.

as for the sketch, I get a whole crap load of errors like these
Atmega_Board_Detector:378: error: 'Serial' was not declared in this scope:/

so far, nothing seems to work from what I have tryed:/ could somebody please make a WORKING stable core or something for the attiny13 please?

thanks for posting all the responses and tips (even though they did not appear to solve the issue)

strykeroz


could somebody please make a WORKING stable core or something for the attiny13 please?
You can trust that it will work if you get everything right your side.  Once it's sorted this will be second nature to you - so do keep at it.

As Nick suggested, can you post a photo of what you've done so we can verify it visually?
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

nickgammon


as for the sketch, I get a whole crap load of errors like these
Atmega_Board_Detector:378: error: 'Serial' was not declared in this scope:/


Serial certainly should be defined. When you compile that sketch the target board is the Uno, not your Attiny13. You upload that sketch to the Uno, use the wiring you already had, and let the Uno test the Attiny chip.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

That1guy99

Hope this helps

http://i1065.photobucket.com/albums/u394/TheEPICness99/Capture.jpg

That1guy99

Quote
Serial certainly should be defined. When you compile that sketch the target board is the Uno, not your Attiny13. You upload that sketch to the Uno, use the wiring you already had, and let the Uno test the Attiny chip.


Thnks:)

I still get an error but its only one error:
Atmega_board_Detector:300 error: 'SCK' was not declared in this scope

spcomputing

I agree with Nick.  I just hooked up using Nick's ABP and it ID'd the chip out of the gate (Out of Box):

Code: [Select]
Atmega chip programmer.
Written by Nick Gammon.
Entered programming mode OK.
Signature = 0x1E 0x90 0x07
Processor = ATtiny13A
Flash memory size = 1024 bytes.
LFuse = 0x6A
HFuse = 0xFF
EFuse = 0xFF
Lock byte = 0xFF
Clock calibration = 0x56
No bootloader support for this device.
Type 'C' when ready to continue with another chip ...


Hookups
Arduino  |  ATTiny13

D10     ---  Pin 1 - Reset (with the Indentation "Dot")
D11     ---  Pin 5 - MOSI (Bottom across from Pin 4)
D12     ---  Pin 6 - MISO (Up from Pin 5)
D13     ---  Pin 7 - SCK

Vcc 5v ---  Pin 8 - Vcc
Gnd    ---  Pin 4 - Gnd

No other passives.

You hookups appear to be like mine.  Only three things I can think of,

1. ATTiny Reset disabled
2. One of the jumpers has a short
3. Uno bootloader corrupted



nickgammon


I still get an error but its only one error:
Atmega_board_Detector:300 error: 'SCK' was not declared in this scope


I compiled it with Arduino 1.0.1 on both Mac and Windows so I don't know what is going on with your installation.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

spcomputing

I just checked out the "core13" installed exactly as installed in the OP and it will upload the stated "Blink" with no problems with all three clock settings (128 kHz WD was a fast blink).

I pulled the ICSP wires one by one and the only ones that give the communication error were disconnected MOSI and MISO lines.

One of those jumpers are bad or flaky connection there abouts.

That1guy99

#13
Sep 28, 2012, 03:16 am Last Edit: Sep 28, 2012, 04:01 am by That1guy99 Reason: 1
I am so stupid.

I forgot to program the arduinoISP sketch
into the arduino before I switched the board to attiny13(or did I not have to do that part?)...

now I am getting the following errors:


avrdude: please define PAGEL and BS2 signals in the
configuration file for part ATtiny13
avrdude: Yikes! Invalid device signature.

        double check connections and try again, or use -F to

override

        this check



WHAT is PAGEL?



It sounds like I am on the right track considering the original
error I was having...(I hope)...




"I pulled the ICSP wires one by one and the only ones that give the communication error were disconnected MOSI and MISO lines.

One of those jumpers are bad or flaky connection there abouts."

I will check that out and use different jumpers. thanks:)



Thnks for all the help   :)

spcomputing

Quote
avrdude: please define PAGEL and BS2 signals in the
configuration file for part ATtiny13
avrdude: Yikes! Invalid device signature.


Try moving the 10uF to your Uno Reset and Gnd and try again (Remember polarity on the cap).  Apparently it is a common Uno problem when programming the ATTiny.  When I was pulling the ICSP jumpers, the Reset jumper not connected caused that error with me.

Go Up