Welcome! Log In Create A New Profile

Advanced

Marlin firmware, ATMEGA2560 port mappings?

Posted by zapro 
Marlin firmware, ATMEGA2560 port mappings?
February 24, 2017 09:00AM
Hi forum.

I'm in the process of making a custom board for a Davinci Mini W-printer. I'm basing it off of an Arduino Mega 2560-board and a "home made" RAMPS-board. I am making the board in KiCAD and will route it out on a LPKF circuit board-plotter.

I've read the Marlin-documentation for 'making new boards' and it suggests that when defining a new board, you should not deviate too far from the RAMPS 1.4-pinout. Why is this?
Looking at the connections to different stepper drivers (step/dir/en) it seems they are scattered all over the place not specifically on different ports on the Mega.

Of course i need to keep servo/heaters/fans on PWM-capable pins, but as there is different timers assigned for different pins on the hardware, there must be a reason to why it's done in this particular fashion?

I'd like to lay out the board to be as clean as possible, so things like PWM will be "pre routed" according to specs, but everything else will be connected to have the straightest possible pats (not a lot of tracks crossing) - i like PCB's that look neat and clean.

So is there a clear 'DO' and 'DO NOT'-list of things i need to keep in mind when connecting stuff up?

Regards,
Per.
Re: Marlin firmware, ATMEGA2560 port mappings?
February 24, 2017 07:04PM
The biggest reason for suggesting to follow the RAMPS connector pin out is it is a very standard board. But if you are going to supply the Pins.h file for your board, it really doesn't matter how you bring things out.

I would suggest you make sure all of your end stops an Z-Probe connectors are on pins that can generate a processor interrupt. That helps with the end stop detection. (Incidently, the RAMPS board has all of its end stop connectors on pins that can generate interrupts.)
Sorry, only registered users may post in this forum.

Click here to login