Terminal/UART connection to 328P Xplained Mini without flashing every time

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had done some small programs on the ATMega328P Xplained Mini.  It's nice.  I now want to do some things that connect a terminal to the UART through the mEDBG.  So, I went back and programmed the chip with the original ReMorse code that Atmel provides.  I get it to work fine, including connection to the terminal.  But, I have to go through a convoluted process to establish the terminal connection, which includes having to flash the 328 with the remorse program *every* time.  I think there should be a way to connect without doing this, but I can't figure it out.

 

Here are the steps that I need to go through to connect:

  • Open AS7
  • Open RealTerm, and set to 9600 N81
  • Connect the Xplained Mini to the USB, and check that it shows up in the Device Manager (COM4)
    • At this point, the Xplained Mini is running the ReMorse code when powered up (button and LED active, not yet connected to terminal)
  • Establish a connection in RealTerm to COM4
    • At this point, the ReMorse program stops running (button and LED no longer active, I don't understand why this killed the program and doesn't just start to display on RealTerm)
  • "Start without debugging" in AS7 to flash the chip
  • Now, Remorse is running completely and properly interacting with RealTerm

 

But, this means that if I hand this board/program off to somebody, they have to know how to use AS7 and program the chip.  I've tried 2 Xplained Mini boards on 2 different computers.  I also tried the terminal program within AS7.

 

It would be so nice if I could figure out how to get them to just play nicely together on their own.

 

I tried taking a tweezers to the _reset pin in the ISP pad array and grounding it, but it didn't do a hardware reset on the 328 like I was expecting.  It just hung up the ReMorse program (including the button/LED), and I again had to re-flash the chip to recover.

 

Thoughts/ideas?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why are you using AS7 at all if the code is already working and the chip programmed?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I just duplicated this symptom on an ATmega328PB X-Mini.  The solution is to disable DebugWIRE.  In AS, hit the run button (green arrow pointing right).  Then do Debug -> Disable DebugWIRE and Close.  To prevent flashing the chip again, you can go to Project -> Properties -> Tool and change the Programming settings to Skip programming prior to hitting the run button.

Greg Muth

Portland, OR, US

Xplained/Pro/Mini Boards mostly

 

Make Xmega Great Again!

 

Last Edited: Sat. Sep 17, 2016 - 06:58 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greg,

 

Thank you so much!  That worked beautifully.

 

I also did an additional sanity check.  Now, when I take the tweezers and ground the _reset pin, the chip actually resets like I expect.