data visualizer on atmel studio

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

i am using atmega 2560 with usbasp and serial port .

on data visualizer i want to use graphs and oscilloscope as a scope for checking my pwm signals.But in my DGI control panel it is not showing any connections under interfaces like SPI or GPIO , i have connected my board with usbasp programmer . i have uploaded the pics 

 

Attachment(s): 

Kunal Gupta

github.com/gkunalupta

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

What do you see when you use a real serial terminal (putty, teraterm, or realterm)?

Have you verified cpu clock speed and thus baud rate values.

What is your clock source?  internal RC or Xtal?  Serial comms need accurate clock source, xtals are FAR better then the internal RC for this.

 

Jim

 

 

 

 

 

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

Serial monitor -herculous and also the serial monitor which is in the data visualizer.Their are no issues with baude rate and cpu frequency

Kunal Gupta

github.com/gkunalupta

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

Kunalgupta wrote:
But in my DGI control panel it is not showing any connections under interfaces like SPI or GPIO , ...
Microchip AVR debuggers are composite USB devices : HID, CDC ACM, [DGI]

from the mega2560 part of DFP pdsc 1.4.346 :

                  <at:tool id="com.atmel.avrdbg.tool.snap"/>
                  <at:tool id="com.atmel.avrdbg.tool.jtagicemk3"/>
                  <at:tool id="com.atmel.avrdbg.tool.edbg"/>
                  <at:tool id="com.atmel.avrdbg.tool.stk500"/>
                  <at:tool id="com.atmel.avrdbg.tool.avrone"/>
                  <at:tool id="com.atmel.avrdbg.tool.medbg"/>
                  <at:tool id="com.atmel.avrdbg.tool.jtagicemkii"/>
                  <at:tool id="com.atmel.avrdbg.tool.powerdebugger"/>
                  <at:tool id="com.atmel.avrdbg.tool.ispmk2"/>
                  <at:tool id="com.atmel.avrdbg.tool.avrdragon"/>
                  <at:tool id="com.atmel.avrdbg.tool.atmelice"/>
                  <at:tool id="com.atmel.avrdbg.tool.jtagice3plus"/>
                  <at:tool id="com.atmel.avrdbg.tool.edbgc"/>
                  <at:tool id="com.atmel.avrdbg.tool.edbg"/>
                  <at:tool id="com.atmel.avrdbg.tool.stk600"/>
                  <at:tool id="com.atmel.avrdbg.tool.pickit4"/>
                  <at:tool id="com.atmel.avrdbg.tool.simulator"/>

MPLAB Snap may have has DGI along with most AVR debuggers.

Atmel-ICE doesn't have complete DGI I/O whereas Power Debugger does (adds UART, GPIO)

 


Data Gateway Interface (DGI) | Data Visualizer User's Guide

https://www.avrfreaks.net/forum/mplab-snap-feb20#comment-2845976

 

edit : strikethru

MPLAB® Snap Pinout Information - Developer Help

MPLAB® PICkit™ 4 Debugger Pinouts for Interfaces - Developer Help

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. Feb 10, 2020 - 08:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kunalgupta wrote:
i have connected my board with usbasp programmer
Which does not have the USB classes that data visualizer uses - you need a Microchip debugger interface.

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

so what debugger/programmer should i use

Kunal Gupta

github.com/gkunalupta

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

Did you not read #4 ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No i didn't ... sry for this .
I just go through the post and then i update if any further query comes.

Kunal Gupta

github.com/gkunalupta

Last Edited: Mon. Feb 17, 2020 - 12:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also in #4 was a link to the DGI documentation - what does that tell you ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

after going through the documentation i figure out that their are two ways of configuring devices in Data visualizer

1) data control panel - in this the devices which have data gateway interface are shown and data gateway interface is with the embedded debuggers .

2) serial port -which is simple in which com port is detected and terminal screen is shown.

 

now i am didnt able to configure any device in data control panel . my serial port is working fine. is this because my debugger -usbasp does not support data gateway interface( Data control panel).???????

 

Kunal Gupta

github.com/gkunalupta

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

Kunalgupta wrote:
is this because my debugger -usbasp
Stop right there. Your first error is to even think that usbasp is a "debugger". It is not. It is ONLY a programmer. 

 

If you want in circuit debugging and data visualization you need to buy a debugger such as an Atmel-ICE or a Snap but even then it might not be able to do the data visualization thing. In fact for that the best bet is probably to buy an "Xplained" development board that has a second, interface micro on it that can do all of program/debug/data-visualization

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

 

Looking at the DGI documentation, it doesn't look like it can directly monitor an analogue value.

 

The GPIOs seem to be digital only:

 

https://www.microchip.com/webdoc/GUID-F897CF19-8EAC-457A-BE11-86BDAC9B59CF/index.html?GUID-1106DC87-9E9B-4331-991E-0B712AF7A037

 

So you would have to do the A-to-D conversion yourself in the micro, and then send the results over one of the serial interfaces for the visualiser to visualise.

 

 

If you just want a cheap, low-performance oscilloscope, why not try something like this:

 

https://hackaday.com/tag/diy-oscilloscope/

 

Or buy something like this:

 

https://bitscope.com/product/BS05/

 

 

 

EDIT

 

And, as clawson et al have said, you cannot do this on a simple programmer anyhow - you would need a properly-equipped debugger for DGI.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Feb 17, 2020 - 02:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I basically want to check the behavior of different PWM signals and Analog values on analog pins for debugging purpose and also to understand their behavior . But this thing is taking a lot time and lot confusing too. So any suggestions ???

Kunal Gupta

github.com/gkunalupta

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

Kunalgupta wrote:
any suggestions ?

Get an oscilloscope!

 

An oscilloscope is the tool you need for doing this stuff!

 

One of the really cheap ones mentioned will be sufficient to get you started - you just need to be aware of its limitations, and keep within them.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Kunalgupta wrote:
I basically want to check the behavior of different PWM signals and Analog values on analog pins for debugging purpose and also to understand their behavior . But this thing is taking a lot time and lot confusing too. So any suggestions ???
In what way did you think "data visualization" was going to help with this anyway?

 

As Andy says if you need to see signal profiles on pins that generated by the chip or to look at signals fed as input you need some kind of scope or logic analyser. An analyser will be fine for purely digital signals like PWM but for varying volatage you need a scope.

 

A debugger can be useful too - it will let you see what's going on "inside" the chip - both in internal registers and the way the software is behaving.