Arduino Mega don't want to read some inputs?!

Hey!

There's little problem... I'm using Arduino Mega 1280 and IDE 1.0

byte currState1 = HIGH;
byte pin1 = 14;

void setup()
{
  Serial.begin(9600);         
  pinMode(pin1, INPUT); 
  digitalWrite(pin1, HIGH);
}

void loop()
{
  currState1 = digitalRead(pin1);
  Serial.println(currState1);
}

Outputs always 0.

If I change pin1 to whatever number instead of 13 or 14, serial monitor output is 1. Or 0, if I press the button. Button is wired from input to gnd. Inputs 13 and 14 don't want to do as I say... Is it normal behaviour or should I consider buying new board?

Pins 14 to 19 are the extra hardware serial port pins. I'd try to avoid using them for input. Pin 13 has the onboard LED associated with it. Again, I'd try to avoid using that pin as an input pin.

I have no problem with input on pin 19. Only 13 and 14 are not working as inputs then... If some pins cannot be used as inputs, are all pins good for outputs?

Only 13 and 14 are not working as inputs then…

Pin 13 should work as input, if the input voltage is high enough to overcome the resistor for the LED. The same is true for pin 14 (which also has a resistor, as do the other TX and RX pins).

If you are able to use 15 through 19 as input, you should be able to use 14 as input. 13, too. If not, it is indicative of a problem.

If some pins cannot be used as inputs, are all pins good for outputs?

Yes, if the pin has not been damaged by prior mistreatment (accidental or otherwise).

Well, I can use other pins than 13 and 14 as inputs. I don't belive I have damaged my board. I have one 230V AC coming in through opto coupler so it shouldn't do any harm. Outputs go through darlington arrays to 24V relays. Everything else seems to be working. 13 and 14 work as outputs.