Hi, I'm new to Arduino environment. i've got Arduino mega 2560 board, I've programmed periodic serial data transmission on Serial Port 0. When the board is connected with Laptop USB power it transmits fine. But when I connect external power, the board gets power but serial communication is not working. Need help me on this....
It may be (though not sure) that because the Mega chooses between external and USB power automatically that when you plug in the external supply it 'turns off' the USB circuitry, meaning Serial via USB won't work. Try with a battery connected to GND and VIN pins on the board and see if you get Serial working.
If that doesn't work then you wire TX on the Arduino to RX on a FTDI cable and RX to TX
Are you suggesting that when the 16U2 has +5V on its VCC/AVCC pins, but not power on its USBVCC pin, that it somehow drags down the Serial lines & prevents the Serial lines from working?
vijaytp_84,what are you trying to communicate with over Serial port 0 when this happens?
Thanks All, Sorry for the delay as I was on a business trip and not able to test the board. The boards works fine, I'm just transmitting the button press status to PC through XBEE, the mistake was the XBEE channel mismatch, I factory resetted the XBEE, now the both firmware and hardware works fine. Thanks Again.