Sampling rate

What is the sampling rate of the arduino mega (atmega1280 chip)?

How can I set it?

thanks for the answers.

Sampling rate for what? Are you asking how frequently you can read the value of a digital or analog pin? The answer to that depends, in large part, on your code. There are multiple ways to read the pins. Some are faster than others. How soon you can read again depends on what you do after you read the pin.