1

I have an ATmeg328 TQFP on a board (in system). I use an Arduino Uno as an ISP to programm the chip. However, i would like to use Serial Communication with the chip through the Arduino board.

  1. Is this possible?
  2. If yes, how can i realize this?

EDIT: i have the tx and RX pins not available. The chip is on a board. With through arduino board, I mean that I would like to use the miso mosi sck pins to do this.

  • What do you mean "through the Arduino board" exactly? – Nick Gammon Aug 26 '15 at 21:05
  • The target chip is connected via ISP to an Arduino Uno. I want to use serial monitor to display information from the target chip, but the chip's only connection is through the Arduino. – pritstift Aug 29 '15 at 10:53
  • Sure, it is possible - you can readily build additional functionality into the Arduiono-as-ISP sketch to accomplish run-time communication with the firmware, potentially including bridging between SPI and asynchronous serial. But you will have to decide for yourself what exactly is required, and come up with some scheme for switching the interface Arduino between ISP vs. communication-bridge mode. – Chris Stratton Sep 27 '15 at 2:04
  • Using an "FTDI cable" and bootloader may be a little more straight forward. Worst case you can set up the Arduino to act like an FTDI cable after you've burnt the bootloader. – Paul Apr 24 '16 at 15:57
1

Just burn the arduino bootloader to your tqfp. Then connect the tx and rx on the tqfp to the tx and rx on your arduino, and pull the reset line on the arduino low.

Downside is you have to do a manual reset on the tqfp before programming. If you have an Uno you could remove the atmega from the socket, and connect the reset on the uno to the reset on the tqfp.

Another option is to connect the TX on the tqfp to the TX pin on the Arduino using a resistor. But for this to work you have to modify the ArduinoISP sketch to make it release TX pin (UCSRnB &= ~_BV(UCSRnB);) and set it to input. And reverse it when data is received on the RX. Not trivial, and only works one way (tqfp to PC).

  • 1
    Thanks for the answer, but i don't want to use tx & rx pins – pritstift Sep 28 '15 at 9:19
0

In addition to my previous comment-suggestion that you could implement communication over SPI by adding functionality to both the ISP sketch and the target program, it now occurs to me that another approach would be to implement software serial functionality on both, assigned to some of the pins used for ISP during that process.

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.