Pages: [1]   Go Down
Author Topic: pins_arduino.c  (Read 558 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a file that defines all the pins on the mega. In version 0022 all i had to do was replace the old pins_arduino.c file with the new one. Now in version 1.0.1 there is no such fileone.  Is it named something else or merged with a different file?

Thanks
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16459
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I count five different versions of the pins_arduino.h avalible in the Aduino standard 1.0.3 release. They are each in their own folder in the IDE core files. On my windows PC they are stored here:

C:\Documents and Settings\Primary Windows User\My Documents\My Programs\Arduino\arduino-1.0.3\hardware\arduino\variants

I'll attempt to attach the file for the mega boards.

Edit:  that didn't work too big.

Lefty
« Last Edit: January 15, 2013, 08:38:20 pm by retrolefty » Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AH ok, thanks.

I was looking in the old place of .../arduino/cores/arduino

Didn't occur to me that they might put them someplace else - duh.

THANKS! smiley
Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I'm still at an impass, the file I need to replace is pins_arduino.c and all the ones in the variants folders are all pins_arduino.h

Humm, I'll see if I can figure out what I need to add to get all the pins maped on the mega.

EDIT
Well thats a bit over my head.  smiley-money

Basically I need to map all the pins on a MEGA2560. I know I can just roll back to 0022 but I would like to keep up with the times so to speak. Any help?


« Last Edit: January 15, 2013, 09:31:40 pm by Jassper » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16459
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I'm still at an impass, the file I need to replace is pins_arduino.c and all the ones in the variants folders are all pins_arduino.h

Humm, I'll see if I can figure out what I need to add to get all the pins maped on the mega.

EDIT
Well thats a bit over my head.  smiley-money

Basically I need to map all the pins on a MEGA2560. I know I can just roll back to 0022 but I would like to keep up with the times so to speak. Any help?




Which variant folder it uses is determined by the board you have selected before you do a verify or upload operation. The folder named mega is the pins_arduino.c file that defines the pin mapping for the arduino mega1280 or mega2560 boards.

Lefty
Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mine only has the .h file and not the .c, I'm not sure what the difference is, tomorrow I will try placing the .c file in there and see what happens.

Thanks!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23597
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd like to see a pins_arduino.h that breaks out All the pins. Be useful when making a standalone 1280/2560 board with a schmartboard breakout board.


* ATMega2560+Schmartboard.jpg (215.52 KB, 882x713 - viewed 24 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Simply pasting the .c file in the .../varients/mega folder did nothing so I changed the file extension to .h and renamed the original, that produced all kinds of errors, so no dice.

I had to roll back to 0022 to get the file to load properly.

If anyone wants to migrate the file I will gladly send it to you. smiley-wink

« Last Edit: January 16, 2013, 10:48:34 am by Jassper » Logged

Erfurt /Thuringia / Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Simply pasting the .c file in the .../varients/mega folder did nothing so I changed the file extension to .h and renamed the original, that produced all kinds of errors, so no dice.

How familiar are you with C, C++ programming? You should modify the renamed file. Best way is to take an existing pins_arduino.h and modify it to your needs.

Cheers
Steffen
Logged

Pages: [1]   Go Up
Jump to: