Go Down

Topic: Attiny2313 as standalone arduino microcontroller (Read 180 times) previous topic - next topic

ivmilicevic

I'm currently working on intervalometer for my camera. Nothing too fancy, one potentiometer at the input to set interval betwen pictures and two relays at the output(for focus and shutter control, independetly). I think that arduino uno (R3, unofficial) is overkill for this kind of project. Can I replace arduino uno with Attiny2313? How would I program attiny? Is there need to flash/burn arduino bootloader or anything? Would there be any problems with code or anything else I should know?

mart256

#1
Feb 12, 2015, 11:51 pm Last Edit: Feb 12, 2015, 11:55 pm by mart256
I'm currently working on intervalometer for my camera. Nothing too fancy, one potentiometer at the input to set interval betwen pictures and two relays at the output(for focus and shutter control, independetly). I think that arduino uno (R3, unofficial) is overkill for this kind of project. Can I replace arduino uno with Attiny2313? How would I program attiny? Is there need to flash/burn arduino bootloader or anything? Would there be any problems with code or anything else I should know?
I recommend Attiny85 (8 kb).

Attiny2323 has small flash memory (2 kb) and that can be easly surpassed.

Coding Badly

...one potentiometer at the input ... Can I replace arduino uno with Attiny2313?
No analog-to-digital converter.


DrAzzy

This is a perfect application for an ATTiny85 (or 84 if you need more pins for controls). You program them using ISP - you can use an arduino-as-isp with the sketch, but I recommend a USBasp for programming it.

You need the attiny cores and board definitions.

 IIRC, on v1.0.6 of the IDE, you also need to update... I think it was the linker... when a sketch went much over 4k compiled - if you get weird errors, google the error and it'll take you to a thread here explaining what needs to be replaced - just replacing a file.

You do the "burn bootloader" thing on tinys, but it doesn't actually put a bootloader on it; it's just to set fuses. You can also do that using other software - I usually set the fuses manually in ExtremeBurnerAVR.
Tiny841 + 1634 Core:http://drazzy.com/e/tiny841.shtml
ATTiny core for 1.6.x, for x4/x5/x61/x7/x8 series) https://github.com/SpenceKonde/arduino-tiny-841

ivmilicevic

I have ordered five attiny85 chips, i hope I will receive them on tuesday or wednesday. Problem is that my arduino uno is currently in project, and I wouldn't like to disassemble project. Can I program the attinyes with other programmer, with LPT/parallel programmer?

CrossRoads

#5
Feb 13, 2015, 07:44 pm Last Edit: Feb 13, 2015, 07:58 pm by CrossRoads
Do you Have an LPT/parallel programmer? If so, which one?
If not, order a USP ASB programmer from somewhere.
I have an Atmel AVR ISP MKii that I use for all my programming.
Or order an Uno, or a clone,
http://www.dipmicro.com/store/index.php?act=viewCat&catId=595
and use that as a programmer, many do.
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.

mart256

I have ordered five attiny85 chips, i hope I will receive them on tuesday or wednesday. Problem is that my arduino uno is currently in project, and I wouldn't like to disassemble project. Can I program the attinyes with other programmer, with LPT/parallel programmer?
Yes.

Buy one

https://www.olimex.com/Products/AVR/Programmers/AVR-PG2B/

or make one

http://www.arduino.cc/en/Hacking/ParallelProgrammer?from=Main.ParallelProgrammer

ivmilicevic

I have a LPT cable for printer, I will cut off the cable and leave just connector. Schematic from arduino.cc seems pretty simple, just 3 resistors and that's it. What is the process with arduino ide, just select Attiny85 from Tools->Processor and Parallel programmer from Tools->Programmer and upload the sketch?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy