1

I got an Ethermega, and learned that Pin 13 already has a LED.

Are there other digital pins with special circuitry or already allocated to a specific function? (like usb,serial,ethernet,sd, etc)

I need about 30 inputs so I can skip some if that would avoid headaches.

2

2 Answers 2

1

D4: ChipSelect for the SD card reader (can be used if no SD is present)

D0 and D1 are Serial RX and TX (just like any other arduino)

D10: Ethernet enable line

D13: led. Led is connected via a mosfet, so it doesn't interfer (like on the uno)

D50, D51, D52: SPI for the ethernet chip and SD card

All this was found in the schematic

0
2

Don't worry about the led on pin 13, it just sits there but doesn't block anything.

You can still use the pin as a normal IO pin.

You didn't mention whether your 30 inputs are digital or analog, so let's have a look at digital input first.

I have never used the MCP23017 mentioned by Martynas, but the linked article looks very interesting and I'll definitely order one of these amazing chips!

Another option might be using 8 bit PISO (parallel in - serial out shift registers, such as the 74HC165. Consider this as the complement to the 75HC595 for output. These shift registers are dirt cheap (around 0.3 €), are available as DIP (important for breadboarding) and can be run via SPI.

Advantages:

  • it's fast to read in 8 digital lines into a byte (why would one want to use more than a bit for the state of a digital input?)

  • the shift registers can be daisychained, subsequent calls of ShiftIn allows to read all (digital) input states into a corresponding data structure (array of bytes, etc.) using just three pins on your Arduino.

2
  • 1
    Klaus i wanted to mention 74HC165 :) but MCP23017 link was open already so i just copied it to give the main idea:) +1
    – Martynas
    Commented Dec 4, 2014 at 8:17
  • @Martynas I think it was a splendid idea to mention the MCP23017! As written by John Boxall in the article that you linked: "...I think the I2C bus is underappreciated". Commented Dec 4, 2014 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.