Hi everyone,
I need something like this http://arduino.cc/hu/Hacking/PinMapping
But for the attiny2313
The only thing i know is that it has a max I/O of 18 but which one is which i have no idea
Thanks!
Hi everyone,
I need something like this http://arduino.cc/hu/Hacking/PinMapping
But for the attiny2313
The only thing i know is that it has a max I/O of 18 but which one is which i have no idea
Thanks!
what im trying to say is that i dont know what does PA 0 for example means or PB1.
I even tried googling PB0 pin but i get stuck at a black berry forum
I need the red text from here couse i have no idea where to connect stuff
Again thaks in advance couse i just cant find anything on that topic
It means Port, letter and position.
so PB0 is Bit 0 on Port B.
PD7 Bit 7 (the last bit in the 8 bit port) on Port D.
INT is an Interupt pin (or just part of a Port depending how you config it).
AN0 would be analog 0 (but can also be a digital Bit on a port as well).
the PDF file from Atmel for this chip should explain the pin definitions normally.
you`ll also have to transpose them manually.
That was verry helpful, i will try to make a diagram and post it to make sure that im correct.
Thnaks alot!
That depends on how the Bootloader is configured. I'm sure there is one out there for the Tiny, but I dont know of one and I don't think the Arduino IDE supports the Tiny. You will probably need to load this with a programer using AVRDude.
If you read over the data sheet, it will explain what each pin can be configured for.
For example;
XTAL1 Input to the inverting Oscillator amplifier and input to the internal clock operating circuit. XTAL1
is an alternate function for PA0.
XTAL2 Output from the inverting Oscillator amplifier. XTAL2 is an alternate function for PA1.
So those pins can be used as either 3-bit Bi-Directional IO port, or you can connect a crystal.
To translate these pins to a "Digital 0, 1, 2 ect" Arduino style layout depends on how the bootloader is set up.
Here is a link I just found,
http://provideyourown.com/2011/arduino-program-attiny/
This might interest you,
You can program it like an Arduino useing the Teensyduino add on, link further down on that page.
OK i have a few questions
1st- how is the attiny 45 able to have configured pins (digital pin 1 , digital 2 and so on) and the Attiny2313 needs additional work for that?
2nd- i just saw that the teensy can act as a joystick, do you have any idea if it can controll a pc game , for example to have a potentiometer act as a steering wheel?
Thanks!
1. Don't know of any Arduino boards that use the ATtiny 45, it only has 8 pins, so not sure what you mean.
2. I'm Sure it could.
it`s easy, check this out: http://hlt.media.mit.edu/?p=1229
you`de just need to write new definitions for the 2313 to make it work.
I mean like this http://www.youtube.com/watch?v=30rPt802n1k it has a defined Digital pin 1, Digital pin 2...
Yup, also it`s a little hard for me to help with Clasic Arduino, in the sense that I don`t use things like pinmode, digitalwrite and all that stuff, I tend to call the ports directly without any abstraction, this may help explain what I mean by that: http://www.arduino.cc/en/Reference/PortManipulation
so doing it this way you only really need to be familiar with the Chip, and not some arbitrary label.
there are definitions in the Arduino folder, I think it`s in Hardware, whereby these pins are assigned their Arduino name, and other things like crystal freq etc...
it May be possible to find a pre-existing definition for the 2313 chip out there somewhere, it`s not something I`v looked into though, sorry.
well if you know how to call the port directly it will be faster, but in my case im still learning how to make programs with digital write and that kind of stuff, and i pritty much found what i needed from here http://provideyourown.com/2011/arduino-program-attiny/
So thanks for the help everyone!