Hello everyone, I recently received a new UNO R4 board and plan to migrate my project to UNO R4. Previously, I used the circuit in the figure below and connected the reset pin of UNO R3 to GND. Then I used this script to burn the AT firmware into ESP01.
Hi @wulu. I see the other helpers have already provided the answer while I was writing, but since there is maybe a little more information I'll post my reply anyway:
One of the significant differences between the UNO R3 and R4 is that the R3 has a dedicated USB chip (ATmega16U2) separate from the primary ATmega328P microcontroller. This means you can hold the ATmega328P on the R3 in reset without affecting the USB CDC serial port that is generated by the ATmega16U2. The primary RA4M1 microcontroller on the R4 is has native USB capability so it can be connected directly to the computer via the USB cable and produce the USB CDC serial port. That is why when you hold the RA4M1 on the R4 in reset mode you no longer get a serial port
The information that explains what you observed is here:
Note especially this:
This is one of the few things that are distinctly different from UNO R3 to UNO R4, as the UNO R3 only features one hardware serial port, that is connected to both the USB port and the RX/TX pins on the board.
I understand that this example can be used to communicate with the AT firmware for configuring ESP01, but it seems like it cannot be used for firmware burning. Could you please explain more clearly? Thank you!
Thank you, it worked.
Here are the steps I took to succeed, hoping to help those who encounter the same problem:
There is no need to ground the RESET pin of R4 board.
Swap the positions of TX and RX based on the circuit diagram provided earlier. That is, connect ESP01's TX to R4's RX and ESP01's RX to R4's TX. And do not ground the RESET pin of R4 board.
Upload the following code to R4;
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
}
void loop() {
if (Serial.available()) {
Serial1.write(Serial.read());
}
if (Serial1.available()) {
Serial.write(Serial1.read());
}
}