Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumWiring HardwareTroubleshooting › ett-avr128 pin mapping

Page Index Toggle Pages: 1
ett-avr128 pin mapping (Read 8371 times)
03/30/09 at 22:22:28

doi_stl   Offline
YaBB Newbies
StL , MO

Posts: 3
Dear Sir:

I was successful in setting up my ET-avr128 into Wiring environment using 'sir Jelengar' method ( http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1226849612 )

I loaded the bootloader using :
and with
"wiring bootloader v2 : 32k clock on PG3-4 and Status led on PG2"
With this, I have to press 'reset' to get into upload mode and upload my compiled file. After finishing uploading, status bar asks for pressing 'reset' button to start the program.

In programming, I have to map my 128 according to the wiringIOboard.pdf and use it as #include<m128mapping.h> in my program.

Here is an example: "m128map.h"

//PORT 0
//port D

#define PD0 0
#define PD1 1
#define PD6 6
#define PD7 7

//PORT 1
//port C

#define PC0 8
#define PC1 9
#define PC2 10
//PORT 4
//port E

#define PE0 32
#define PE1 33
#define PE6 38
#define PE7 39

and for my analog pin

//PORT 5
//analog in ports : PF

#define PF0 1
#define PF1 2
#define PF6 7
#define PF7 8

I tested with 'hello world" -- blinking-- ,  and it seemed to work fine .

From what I could see from the schematic, we should have IO pins up to only 39 or if you would include Analog pin then it should be somewhere around 47.

However, in you example code, given to someone :
// Blinking LED
// by BARRAGAN <http://barraganstudio.com>;

int ledPin = 48;           // LED connected to the Wiring I/O board pin 0

void setup()
pinMode(ledPin, OUTPUT); // sets the digital pin as output

void loop()
digitalWrite(ledPin, HIGH);   // sets the LED on
delay(100);                  // waits for a second
digitalWrite(ledPin, LOW);    // sets the LED off


How and where do you get the # 48  for the ledPin ? What port pin is assigned to 48 ?

Should I change my analog pin to the number pin starting from 39 in my header file ?

Thanks for the advice.


« Last Edit: 03/30/09 at 23:40:59 by doi_stl »  

wiring newbie......
IP Logged
Reply #1 - 04/01/09 at 21:01:34

barragan   Offline
YaBB Administrator

Posts: 939
Please check the circuit diagram here: http://wiring.org.co/download/WiringIOboard.pdf
you´ll find the connection of the LED to PG0 (wiring pin 48)
Check also the source code for the pin mapping. http://wiring.uniandes.edu.co/source/trunk/wiring/core/WApplet.c?revision=492&view=markup
Let me know.
IP Logged
Reply #2 - 04/02/09 at 14:17:50

doi_stl   Offline
YaBB Newbies
StL , MO

Posts: 3
Thank you very much indeed. I saw it now with pin 48.

Thanks again for those 2 URL's.



wiring newbie......
IP Logged
Page Index Toggle Pages: 1