Welcome! Log In Create A New Profile

Advanced

Extruder Firmware pin assignment

Posted by lcomtois 
Extruder Firmware pin assignment
October 16, 2009 03:55PM
I am trying to understand how the pin assignment work for the Extruder Controller v2.2.

I want to understand how pin assignment work. In configuration.h.dist

#define RX_ENABLE_PIN 4
#define TX_ENABLE_PIN 16

On the chip the pins are 30 for RX and 31 for tx. for the temperature sensor:

#define TEMP_PIN 3

It is pin 26 (ADC3) on the chip.

#define POT 0

The pot is on pin 23 (ADC0) on the chip.
If I want to use pin 19 (ADC6) should I use "#define TEMP_PIN 6" ?
Why is pin 4 the rx pin ?
Re: Extruder Firmware pin assignment
October 17, 2009 12:56AM
I spent a whole day trying to do the same, and its no help from Arduino to nnot describe on their FAQ page what it all means.

I don't know why they chose pin 4 to be rx but
The Arduino notation of pin assignments are
D0 Pin 1 to
D13 pin 14
A0 Pin 15 to
A7 pin 22

But the ADC called pins are returned as Pin 1 for A0
Crazy huh?
emt
Re: Extruder Firmware pin assignment
October 17, 2009 09:32AM
Hi

RX_ENABLE_PIN is indeed digital pin 4 it is receive ENABLE not receive!

The define numbers refer to the actual digital pin numbers if it is for a digitalWrite but refer to the ADC number if it is for a an analogWrite.

So if you want to use Pin 19 as an analogue pin you do indeed use #define TEMP_PIN 6.

However if you wanted to use it as a digital pin you would have to define it as 19.

The best way to check the pin functions is looking through the code and seeing if it is being used as digital or analogue.

Edited 1 time(s). Last edit at 10/17/2009 11:31AM by emt.


Regards

Ian
Re: Extruder Firmware pin assignment
October 17, 2009 06:13PM
Also, I just connected up a thermocouple board to the A6/A7 headers on the extruder controller 2.2 board. Be careful, the silkscreen on those headers isn't correct.
Sorry, only registered users may post in this forum.

Click here to login