1

I'm trying to use my Arduino Uno as an ISP to program an ATTiny85 and at the same time check my board by using the SoftwareSerial library to output the values I'm getting from my sensor.

Is this actually possible? Or does it require 2 different setups? Because I found a lot of tutorials and threads about one or the other, but never both. Which I find odd because once you send your program to the chip you might want to test it as well (or debug it).

Many thanks for your help and input! :)

asked Jan 20, 2019 at 14:06
4
  • 1
    Sure you can. You'd need to modify the ArduinoISP sketch to include whatever serial functionality you desire. Commented Jan 20, 2019 at 14:08
  • Would adding a code like that work for example? #include <SoftwareSerial.h> char anyChar; void setup(){ Serial.begin(9600); //to serial monitor Serial1.begin(9600); //connected to Attiny (RX to tx and TX to rx) } void loop(){ if(Serial1.available() >0) { anyChar = Serial1.read(); Serial.print(anyChar); } } Commented Jan 20, 2019 at 16:15
  • Possibly, though it may interfere with ISP programming. You should provide a facility (maybe a switch connected to a GPIO pin) to switch between programming and testing mode. Commented Jan 20, 2019 at 18:59
  • To keep things simple I would recommend using two Arduino's. One for the ISP and one for the test harness. Alternatively @Majenko's suggestion using a GPIO pin and switch to toggle between to two modes (programming and test harness). Commented May 28, 2019 at 12:55

1 Answer 1

1

I'm not really sure, but in the Arduino ISP example there is an if that looks if the ISP is in program-mode. You could try adding in the else statement of that if the Software Serial part.

answered May 27, 2019 at 18:14

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.