Open emetss opened 6 years ago
RAMPS uses the same arduin pin numbers. In reprap.org wiki you have a pinout whcih pin has whcih number. In general you can use any pin with any function ifthere are no special requirements. For analog inputs you always need a analog pin of course. In config tool just enter the digital pin number you used instead.
Many thanks for your reply. I'm still confused. I have protos 3d printer which has SD and LCD features used. I don't have the schematics but I have the Firmware. I don't have a configuration tool but I have configutation.h in the reptier Firmware. I searched in the internet and found the attached pictures for the schematics. You see as the pictures tell that AIN0 is D54 ?. Also I looked in the Firmware "reptier" for the Protos and under pins.h I found the following:
// #define RAMPS_V_1_0
My problem is that I don't know how to read these numbers. Does -1 mean that the pin is not used? How about the other numbers? And Also very important question: How to find an unused pin (digital input in my case) and how to choose it. I want it to be called by M code in the GCode.
Many many thanks in advance
For ramps better use this to see pin numbers: https://reprap.org/wiki/File:Arduinomega1-4connectors.png
AIN0 is analog pin 0 if used as analog pin and D54 = pin 54 if used as digital pin. That is all. -1 is not defined as pin number, so it would do nothing.
Thanks for your kind reply. I checked the schematics you sent to me. There're still some numbers that can't be seen in the schematics. From the definitions below (in the repetier Firmware) I could only find the following pins: D3, D2, D14, D15, D18, D19, D53, D9, D12, A13, A14 Could you tell me where to find D54, D55, D38, D60, D61, D56, D46, D48, D62, D26, D28, D24, D13, D12 in the schematics?
// For RAMPS 1.4
Many thanks in advance for your kind reply
Hi, Am Mi., 13. Juni 2018 um 02:46 Uhr schrieb emetss <notifications@github.com
:
Thanks for your kind reply. I checked the schematics you sent to me. There're still some numbers that can't be seen in the schematics. From the definitions below (in the repetier Firmware) I could only find the following pins: D3, D2, D14, D15, D18, D19, D53, D9, D12, A13, A14 Could you tell me where to find D54, D55, D38, D60, D61, D56, D46, D48, D62, D26, D28, D24, D13, D12 in the schematics?
As you see these are hard wired to components like stepper drivers and therefor do not appear in the external list. These are preset with the symbolic definition in pins.h as you already found out.
Yours Roalnd Littwin
// For RAMPS 1.4
define X_STEP_PIN 54
define X_DIR_PIN 55
define X_ENABLE_PIN 38
define X_MIN_PIN 3
define X_MAX_PIN 2
define Y_STEP_PIN 60
define Y_DIR_PIN 61
define Y_ENABLE_PIN 56
define Y_MIN_PIN 14
define Y_MAX_PIN 15
define Z_STEP_PIN 46
define Z_DIR_PIN 48
define Z_ENABLE_PIN 62
define Z_MIN_PIN 18
define Z_MAX_PIN 19
define E_STEP_PIN 26
define E_DIR_PIN 28
define E_ENABLE_PIN 24
define SDPOWER -1
define SDSS 53
define LED_PIN 13
define FAN_PIN 9
define PS_ON_PIN 12
define KILL_PIN -1
define HEATER_0_PIN 10
define HEATER_1_PIN 8
define TEMP_0_PIN 13 // ANALOG NUMBERING
define TEMP_1_PIN 14 // ANALOG NUMBERING
Many thanks in advance for your kind reply
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/repetier/Repetier-Firmware/issues/795#issuecomment-396778491, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5AH7WbQObNDmjwLJblVLzWO7fcZk67ks5t8GD_gaJpZM4UfJqH .
-- Mit freundlichen Grüßen
Roland Littwin
Hot-World GmbH & Co. KG Knickelsdorf 42 47877 Willich Deutschland
Tel.: 02154-606518 Fax: 02154-606519
Geschäftsführer: Marcus Littwin Handelsregister: Amtsgericht Krefeld HRA 5325 Umsatzsteuer-Identifikationsnummer: DE213748632 Persönlich haftender Gesellschafter: Hot-World Medien GmbH mit Sitz in Willich Handelsregister: Amtsgericht Krefeld HRB 10800
Stumbled upon this nifty piece of hardware, which enables you to add more peripherals via i2c, but also makes programming a bit tougher (I am giving it a shot for my LED extensions): https://learn.sparkfun.com/tutorials/sx1509-io-expander-breakout-hookup-guide
Good luck. Do not block interrupts for longer communications and send data only in main thread not from an interrupt. Should work well if done right.
Many thanks for the answers. I checked my card and found that I have Aux-2 and Aux-1 all free. So let's say I want to use the D63 (from Aux-1) as an digital output by adding a special gcode line (M999 for example). Firstly I have to define the new pin in the pins.h: #define device1_Trigger_Pin 63 Secondly in the Printer::Setup() I have to define it as an output: SET_OUTPUT(device1_Trigger_Pin); Thirdly, in the Commands::executeGCode(GCode *com), I have the line: else if(com->hasM()) // Process M Code { switch( com->M ) { //I can add this: case 999: WRTITE(device1_Trigger_Pin,HIGH); .......
Is it correct and enough? Will the gcode accept the new parameter "M999"? Or should I define it elsewhere?
Many thanks for your kind reply
No that would be enough except M999 already exists to resume from fatal errors.
The better solution would be to do all this with our events. There is a event for M codes and also for init. Defining pin numbers in pin.h is not really required. You can also define it in your events or directly use your number. See teh sample event systems in the github repository. For the felix printer I use events for all extensions of the printer including M codes.
https://github.com/tecan/PCF8574-SWire-Arduino.git adds 8 new i/o ports https://github.com/tecan/Adafruit_SSD1306-SWire-Arduino
both have the ability to use any of the digital io pins for i2c on arduino mega and due
But you can not address them like normal io ports, so you have to modify the code changing these pins.
Hi all, I have an Arduino mega 2560 with ramps 1.4 and a repetier firmware for a 3d printer. I want to add some features to control some additional things (additional fans, and so on). Do I have spare (free) I/Os, which i can use? Also what's the mapping between the mega 2560 and the ramps 1.4 ? I should "define" the pins as their numbers in the arduino but it's not like that. They are defined with different numbers.
Thanks