Pause on a measurement in code

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

Hi Guys,

I am using an M328P to read an analog voltage on an ADC channel.

Is there any way I can pause at the point in the code that measures the analog voltage?

In other words, how can I put a breakpoint in the code and measure the voltage on the adc channel with a multimeter? Will I need JTAG for this?

Thanks.

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

Got an extra I/O pin? Stick a button on it, go into an infinite loop until the button is pressed, then resume.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

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

if you can tell the avr to continue(keyboard, usb, uart, spi, twi) then just wait in your code for that command to be given.

otherwise you need an ice to set a breakpoint in the code and then do your hand measurment after the debugger is stopped and then let it continue.