Mapping AVR 2313 pins to the pins in arduino programming...??

Hello All

I am working with an ATtiny2313 and am wondering how do I map the physical pin on the chip to the pin I am referring to in my program.

Assistance would be much appreciated.


[edit]Removed Incorrect Table[/edit]

That list of 20 can't be right - the ATTiny2313 only has 20 pins, and two are power & ground.

CrossRoads: That list of 20 can't be right - the ATTiny2313 only has 20 pins, and two are power & ground.

Thought it was too easy to find that table :D

Maybe that could help

Still struggling, so if anyone has any pointers that would be usefull.

I have found the following link which gives a limited mapping (sumarised below) which I will verify tonight, but there are still many pins missing.

| Arduino | Attiny2313 | | - | - | | Pin 10 | Pin 1 - RST | | Pin 11 | Pin 17 - MOSI | | Pin 12 | Pin 18 - MISO | | Pin 13 | Pin 19 - SCK | | Vcc (+5V) | Pin 20 - Vcc | | Gnd | Pin 10 - GND |

It would be great if someone could provide the full mapping list as I do not wish to spend time identifying these - There is loads of other stuff I need to do.


You need to find a file like this two
for the 2313, or create them.
And probably add to the two .txt files to call out the 2313.

If you don’t come across something else, and you are using the Reset lines and an externa Crystal, I would propose this mapping:

Pin1 - Reset, or PA2 (or, D17?)
Pin2 - PD0/RX -->D0
Pin3 - PD1/TX → D1
Pin4 - Crystal, or PA1 (or, D16)
Pin5 - Crystal, or PA0 (or, D15)
Pin6 - PD2/INT0 → D2
Pin7 - PD3/INT1 → D3
Pin8 - PD4 → D4
Pin9 - PD5 → D5

Pin11 - PD6 → D6
Pin12 - PB0/A0 → D7
Pin13 - PB1/A1 → D8
Pin14 - PB2 → D9
Pin15 - PB3 → D10
Pin16 - PB4 → D11
Pin17 - PB5/MOSI/SDA → D12
Pin18 - PB6/MISO → D13
Pin19 - PB7/SCK/SCL → D14

pins_arduino.c (12.1 KB)

pins_arduino.h (3.02 KB)

boards.txt (9.29 KB)

programmers.txt (451 Bytes)

Thanks for the pointers Crossroads

Seems like I need to do a load of 'wiring' to program my 2313 in addition to simply writing the program itself :(

Not really what I want to be doing... but there you go. ...has support for the ATtiny2313.

Well that's certainly a lot easier!

Indubitably. :D

Thanks for the help guys

I managed to upload something, but then screwed the device signature.... :(

Anyway, moving forwards slowly. Moved my issue to the micro controllers forum as that seems to fit better.