Go Down

Topic: How to program ATtiny2313, given an Arduino Duemillanove (Read 12 times) previous topic - next topic

Coding Badly


Digital pin 13 is the middle of the processor on the right side...
http://code.google.com/p/arduino-tiny/source/browse/trunk/hardware/tiny/cores/tiny/pins_arduino.c#46

Are you certain the LED is connected to the correct pin?

Do you have a current limiting resistor in series with the LED?

Do you have a 10K pullup resistor connected to RESET on the ATtiny2313?

Diegoo

hello, the pull up resistor isn't in the circuit, in the next test, i try it.

I say you with something.


Thanks.

Diegoo

hi! i test with the resistor and the result is the same. the microcontorler doesn't work.

i open the boards.txt and i see that the fuses are incorrect, i change the fuses and it is the result:



attiny2313at8.name=ATtiny2313 @ 8 MHz (Oscilador interno)

# The following do NOT work...
# attiny2313at8.upload.using=avrispv2
# attiny2313at8.upload.using=Pololu USB AVR Programmer

# The following DO work (pick one)...
# attiny2313at8.upload.using=arduino:arduinoisp
# attiny2313at8.upload.protocol=avrispv2
# attiny2313at8.upload.using=pololu

attiny2313at8.upload.maximum_size=2048

# Default clock (slowly rising power; long delay to clock; 8 MHz internal)
# Int. RC Osc. 8 MHz; Start-up time: 14 CK + 65 ms; [CKSEL=0100 SUT=10]; default value
# Brown-out detection disabled; [BODLEVEL=111]
# Serial program downloading (SPI) enabled; [SPIEN=0]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]

attiny2313at8.bootloader.low_fuses=0x64
attiny2313at8.bootloader.high_fuses=0xdf
attiny2313at8.bootloader.extended_fuses=0xff
attiny2313at8.bootloader.path=empty
attiny2313at8.bootloader.file=empty2313at8.hex

attiny2313at8.build.mcu=attiny2313
attiny2313at8.build.f_cpu=8000000L
attiny2313at8.build.core=tiny


i think that the microcontroler doesn't work because this archive are wrong. What do you think?


thanks in advance!

Coding Badly

Quote
[font=Courier New]attiny2313at8.bootloader.low_fuses=0x64
attiny2313at8.bootloader.high_fuses=0xdf
attiny2313at8.bootloader.extended_fuses=0xff[/font]


Divide clock by 8 internally; [CKDIV8=0]
...with your fuses, the processor runs at 1 MHz not 8 MHz.

Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]
...with your fuses, EEPROM is erased when the processor is programmed.

The first change is wrong.  The second change is entirely your choice.

Quote
[font=Courier New]# The following DO work (pick one)...
# attiny2313at8.upload.using=arduino:arduinoisp
# attiny2313at8.upload.protocol=avrispv2
# attiny2313at8.upload.using=pololu[/font]


What are you using for a programmer?

Diegoo

Hi! the problem is solved yet!
the code of attiny2313 that i downloaded was bad, i changed the fuses...

attiny2313at1.bootloader.low_fuses=0x64
attiny2313at1.bootloader.high_fuses=0x9F
attiny2313at1.bootloader.extended_fuses=0xFF

With this fuses my microcontroler works without problem.
Thanks very much to all for help me! Its will be a big comunity! =)

samuelaor

#65
Aug 09, 2012, 12:08 am Last Edit: Aug 09, 2012, 12:23 am by samuelaor Reason: 1
Hello, all! First timer here!

I found this thread looking for a way to upload a program in C (or hex) to the ATTiny2313 via Arduino. I noticed it was mentioned on the first page, but I didn't see an answer (or didn't understand it).

My situation:
* Want to upload a clock program to the ATTiny2313, "clock.hex"
* Using an Arduino Uno R3
* Running on a Windows 8 PC
* Arduino-tiny library installed
* I have the setup working, successfully uploaded a blink sketch to the 2313 running at both 1MHz and 8MHz.
* Upload using avrdude (I'm using Windows 8 ) with the arguments:

Quote
avrdude -b 57600 -p attiny2313 -c arduino -P COM4 -U flash:w:clock.hex


which I copied from another thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1258854659/7

I'm getting:

Quote
avrdude: stk500_getsync(): not in sync: resp=0x1c


### EDIT:
### So far I was not connecting a capacitor between GND and RESET on the Arduino, because it worked without, did not wirk with.
### Now when I added the capacitor, the avrdude error message changed to resp=0x00

Am I doing something wrong or something impossible? ;)

Thanks,

Sam

baselsw


Hello, all! First timer here!

I found this thread looking for a way to upload a program in C (or hex) to the ATTiny2313 via Arduino. I noticed it was mentioned on the first page, but I didn't see an answer (or didn't understand it).

My situation:
* Want to upload a clock program to the ATTiny2313, "clock.hex"
* Using an Arduino Uno R3
* Running on a Windows 8 PC
* Arduino-tiny library installed
* I have the setup working, successfully uploaded a blink sketch to the 2313 running at both 1MHz and 8MHz.
* Upload using avrdude (I'm using Windows 8 ) with the arguments:

Quote
avrdude -b 57600 -p attiny2313 -c arduino -P COM4 -U flash:w:clock.hex


which I copied from another thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1258854659/7

I'm getting:

Quote
avrdude: stk500_getsync(): not in sync: resp=0x1c


Am I doing something wrong or something impossible? ;)

Thanks,

Sam


I'm assuming that you're not using a crystal, your using arduino isp sketch and that you burned the fuses with the tiny-arduino library.

The thing is if you look at the boards.txt file (tiny-arduino library), you'll see that the programmer is actually stk500v1 and not arduino. The baud rate that the isp sketch is working with is 19200 and not 57600.

Try typing this line instead:

Code: [Select]
avrdude -c stk500v1 -P com4 -p t2313 -b 19200 -U flash:w:clock.hex -v -v

If my assumptions are wrong then please, tell us what you have for programmers/equipment/components etc...

Also look at the topic I wrote about programming Attiny2313. Link: http://arduino.cc/forum/index.php/topic,116477.0.html

samuelaor

Your assumptions were right (and yes, no cristal).

Your solution was also right. It burned the file right away.

Thank you very much, sir! Have a nice evening! XD

baselsw


Your assumptions were right (and yes, no cristal).

Your solution was also right. It burned the file right away.

Thank you very much, sir! Have a nice evening! XD


Your welcome. Glad I could help =)! You too!

Go Up