2

I'm trying to program a Nano by using an Uno as the ISP. So far, I've followed along with the example project for getting the Uno running as the ISP on https://www.arduino.cc/en/Tutorial/ArduinoISP.

After a bit of tinkering, it works, but the serial monitor won't work correctly. I'm uploading a super simple program that delays for 500 ms and prints to the log.

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("test");
  delay(500);
}

I've wired the TX pin on the Nano to the RX pin on the uno. The monitor updates every 500 ms as expected after doing so, but displays ��� instead of the word test. When I tried wiring TX -> TX, the serial monitor does not update. Does anyone have any insight what's missing here?

  • 2
    You can't really connect an ordinary Arduino's serial pins to both another device and the on-board USB serial converter at the same time. You'd probably do best to use a separate USB serial converter for the target, otherwise you need to use software serial (or better a chip with a 2nd hardware port) and add some sort of selectable pass-through mode to your ISP sketch. Possible, but not easy, try using the separate converter instead. – Chris Stratton Mar 18 '17 at 2:39
  • @ChrisStratton gotcha, thank's for the explanation. I tried to use the mini usb to connect the nano, but my computer doesn't seem to recognize it. It was still fun to learn about ISPs though – Chris Mar 18 '17 at 2:48
  • @ChrisStratton. Please, post your comment as an answer to close this question. – user31481 Nov 15 '17 at 21:09
  • Can you try by writing on the uno a program to set the TX and RX pins as inputs? Just something like void setup() { pinMode(0, INPUT); pinMode(1, INPUT); } void loop() {}, then repeat again the test (I think you'll have to connect the nano TX to TX and nano RX to RX) – frarugi87 Dec 14 '17 at 14:33
1

As Chris Stratton suggests in his comment above:

You can't really connect an ordinary Arduino's serial pins to both another device and the on-board USB serial converter at the same time.

To solve your serial monitor problem use a separate USB serial converter and connect that to your Arduino Nano.

If you don't have access to a dedicated USB serial converter you could use software serial on the Arduino Nano. This allows you to connect the Arduino Uno Rx pin to the software serial Tx pin. You will also need to program the Arduino Uno with a program that re-transmits the data it receives back out to the PC serial monitor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.