Welcome! Log In Create A New Profile

Advanced

Pin designations question

Posted by leadinglights 
Pin designations question
December 06, 2013 01:12PM
On the Repetier firmware, waht do the pins in pins.h and uiconfig.h refer to?

for example, in the following, what are pins 54, 55 & 39 in the pins.h for a Ramps 1.3 board?
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38

Trying to trace them through the schematics for Ramps 1.3 and Arduino MEGA 2560 they seem to be MCU pins 97, 96 and 50. I can't see anything else on the schematics that they may tie up with.

Further information: I have a number of bits like SD readers (sdramps), LCD displays etc., which I am trying to get to work. After the usual initial "plug it in and see if it works" (it didn't) I started looking at the configuration to check if the pin assignments were right - resulting in confusion only.

Mike.

Ah! light dawns. Anything on the AUX4 port and some other AUX ports, the D numbers like D31 would tie up with 31 on pins.h, while numbers higher the 53 are A0 to A15 (Ramps pin is "D" plus pin number in header file unless number in header file is greater than 53 when it is "A" minus 54. So pin 54 is A0. Simples.smiling smiley

Mike

Edited 1 time(s). Last edit at 12/06/2013 01:35PM by leadinglights.
Re: Pin designations question
December 06, 2013 01:32PM
The pin numbers refer to Arduino numbering. For the Ramps 1.3 there is a nice graphic showing which pin has which Arduino pin:
http://reprap.org/wiki/File:Arduinomega1-3connectors.png


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Pin designations question
December 06, 2013 01:58PM
Excelent, so if I change the difinitions in uiconfig.h to

#else // Direct display connections
#define UI_DISPLAY_RS_PIN 16 // was 63
#define UI_DISPLAY_RW_PIN -1 // Not used
#define UI_DISPLAY_ENABLE_PIN 17 // was 65
#define UI_DISPLAY_D0_PIN 23 // was 59
#define UI_DISPLAY_D1_PIN 25 // was 64
#define UI_DISPLAY_D2_PIN 27 // was 44
#define UI_DISPLAY_D3_PIN 29 // was 66
#define UI_DISPLAY_D4_PIN 23 // was 59
#define UI_DISPLAY_D5_PIN 25 // was 64
#define UI_DISPLAY_D6_PIN 27 // was 44
#define UI_DISPLAY_D7_PIN 29 // was 66
#define UI_DELAYPERCHAR 320

that should work for that - and similarly buzzer to 31 and something for hte encoder and click swich.

I can see that I will have fun - if I dont get stomped on by a gotcha.

Mike

But that was before I read ui.h eye rolling smiley

Edited 1 time(s). Last edit at 12/06/2013 02:08PM by leadinglights.
Re: Pin designations question
December 06, 2013 02:14PM
What is the problem with ui.h?
Set
#define FEATURE_CONTROLLER 1
and all these controllers are ignored and the definition from uiconfig.h is used.

If of course you have one of the existing controller, it is easy to do in Configuration.h


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Pin designations question
December 06, 2013 02:24PM
I had just tracked back to Configuration.h and found that as well. I don't have any existing controllers, just a bunch of bits.

Mike.

I was much happier when most problems were solved by hitting them with a flint axe - then replacing the glass bottle thingy that you just broke..
Sorry, only registered users may post in this forum.

Click here to login