Display of signed numbers

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

In Atmel Studio 7 watch window the signed numbers are displaying in hexadecimal. How do I get them to display as a regular integer?

This topic has a solution.
Last Edited: Wed. Mar 25, 2020 - 11:25 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Right click the value in the watch window. The popup lets you turn off the hex formatting.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

dnoyeB wrote:
the signed numbers are displaying in hexadecimal

 

Not just signed numbers, surely?

 

As Jim says, you have just 2 options to cover everything: Hex or not.

 

frown

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

If it is NOT hex formatted, it will take the display format from the data type. If it is an unsigned integer, it will show it that way. If it is a signed integer, it will show it as signed.

 

By using the right-click, you can change the format of any individual watch variable, so that they do NOT have to all be the same. That hex/not-hex selection may also control the format for newly added watch variables; don't remember that behavior, for certain.

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Wed. Mar 25, 2020 - 11:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

I thought I tried that but I guess I hadn't. Thanks!