Welcome! Log In Create A New Profile

Advanced

How to define pin numbers on marlin fw

Posted by meybivi 
How to define pin numbers on marlin fw
July 08, 2013 08:56AM
Hi everyone, im trying to make pin definitions of marlin firmware in pins.h file. But I saw this kind of definitions there,

#define Y_STEP_PIN 60
#define Y_DIR_PIN 61

Arduino mega hasnt pin 60 or 61. How I can define analog or digital pins here?

Thanks!
hi meybivi check this out..
[letsmakerobots.com]
Re: How to define pin numbers on marlin fw
July 11, 2013 07:35PM
reference arduino forum here: [forum.arduino.cc]

past pin 53 is analog register for mega 1280, and mega 2560, so typically A0 would be pin54. also you could as of arduino ide 0.22 and above directly place A0 as a digital pin. such as digitalWrite(A0,HIGH); wich is the recommended method, because different chipsets have different pin counts, and different start numbers for i/o for ad pins. arduino wiring takes care of it if you assign digital pin as A0-A15.


basically the pin out is as follows
Port____________Pin________Function
_PF_0____________54____________A0
_PF_1____________55____________A1
_PF_2____________56____________A2
_PF_3____________57____________A3
_PF_4____________58____________A4
_PF_5____________59____________A5
_PF_6____________60____________A6
_PF_7____________61____________A7
_PK_0____________62____________A8
_PK_1____________63____________A9
_PK_2____________64____________A10
_PK_3____________65____________A11
_PK_4____________66____________A12
_PK_5____________67____________A13
_PK_6____________68____________A14
_PK_7____________69____________A15

Edited 1 time(s). Last edit at 07/11/2013 07:36PM by jamesdanielv.
Re: How to define pin numbers on marlin fw
July 12, 2013 09:58AM
Thanks guys, it helped much!
Re: How to define pin numbers on marlin fw
August 07, 2016 03:56PM
Head Explode! Rumba has an ATMega2560 16AU V3 100 pin device, the numbers listed above appear to be for devices with many pins less. Is there a spreadsheet with the 100 pin devices?
Thanks
I'm trying to verify pin mappings - TQFP device

Edited 2 time(s). Last edit at 08/07/2016 04:02PM by KevinA.
Sorry, only registered users may post in this forum.

Click here to login