I have a mega 2560 pro that works fine until I put it onto my PCB. The problem is that I cannot upload sketch to the board when attached, nor receive input from Serial. Can anyone tell me the state of relevant pins that affect this issue. (The 2560 does transmit out when connected) I would like to send a spec of the board that I'm using, but I'm not sure my boss would like that. Thank you for any help.
Which Serial port and pins of the 2560 are you using to communicate via serial ?
The serial port that is in question is the microUsb Serial port.
A Mega PRO on Amazon: https://www.amazon.com/SongHe-ATMEGA2560-16AU-Pinheaders-Compatible-Mega2560/dp/B07TGF9VMQ
A copy of the schematic taken from here:
It seems alright, it has even a protection diode for the /RESET and a polyfuse for the USB power.
Pin 0 and 1 are labeled RX and TX. You should not use those, they are for uploading the sketch and for the Serial Monitor.
Pin 13 is has no buffer. You can not use that as a input for a weak signal.
I'm a bit worried about the VIN / 5V / 3.3V pins. If you did something wrong there, then the ATmega chip can be damaged. Did you measure the voltages ? The ATmega2560 needs at least 4.5V. The Arduino Uno runs on a lower voltage, but the ATmega2560 does not.
Are you trying to put 12V to VIN ? Then the voltage regulator might get (too) hot.
You mean the same one that is used by the Serial monitor and when uploading code. I fear that there is a conflict
Why not use one of the other 3 hardware UARTs instead ?
detach serial cables while uploading sketch
@UKHeliBob I need the usb to work. To my knowledge, the Serial3 is working, and usb is transmitting, just not receiving.
Although hardware is not my strongest point, it sounds like you have a problem on your PCB. A schematic is the minimum that is needed.
Did you check your PCB for shorts between pins and so on?
@Koepel @sterretje @UKHeliBob ----I pulled out the RST, RX, and TX pins from the MEGA 2560 Pro, so they wouldn't connect with the PCB, and now it receives commands. Now to figure out which pin my PCB is interfering with.
Why ? Let them stay on the Mega board and don't let them get to your pcb.
it was the rx pin. @Koepel, I don't completely remove them. I just raise them up so they don't reach contacts.
Are you using the Rx pin for anything on your dedicated PCB? Or was there a short somewhere? Or ...
As I mentioned earlier, a schematic of your PCB would have been useful. You probably would have gotten a solution in approximately two replies after posting that
You can mark your topic as solved by clicking the Solution button under the most useful reply so others know that a solution was provided.
@sterretje The schematic didn't show it going to anything, but somehow, the schematics I receive are not always accurate. And now thinking about it, I may have been able to show it. Thanks all!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.