My question is : I know that GPIO is 3.3v in raspi , and mega IO pins is 5v. In my case i want to send data serially from raspi to mega so i will connect tx from raspi as output to rx in arduino as input. if i do that without other connection just this , can i connect them directly ? raspi will send 3.3v output and arduino will recieve it so i think no damage will occur in both devices and the arduino should detect it as HIGH ? and i want to connect common ground between both devices .. so what do u think ?
Note that most Arduinos work just fine when powered with 3.3V, although this is technically out of specification use. However, you only need to do something if you want bidirectional communication: sending a signal from a 3.3V device (such as a Pi) to a 5V device (Arduino) is a very common use case, and virtually all modern 5V devices have no trouble understanding 3.3V signals. Arduino has tons of addons featuring 3.3V ICs, and in many cases there are no level shifters on Arduino inputs of such addon boards.