Binary in watch window????????

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

Hallo there?

A very big problem (in my opinion) thet the AVRStudio X has is that there is no way to see a constant, integer, byte or anything, in the watch window in binary format.

I think that a lot of you have or had the same problem in the past.

Don't you think that now is time for Atmel corp. to do it?

Take a look to any other assembler or compiler and you will see that you can see a thing in any format except in Atmel's AVRStudio.

Does anybody knows how can I post these words to Atmel????

Thanks a lot.
Michael

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

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

But it shows it in hex and if you can't convert hex digits to binary as you read them you may not be in the right business!

Cliff

(BTW there's a sticky post at the top of the forum about posting bug reports/ideas to Atmel - basically email to avrbeta at atmel dot com)

Last Edited: Thu. Oct 27, 2005 - 05:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I realy thank you ror your reply
but you have to know that standing behind a monitor you know sometimes may be wrong.
My realy job is a fisherman but I work with micros everyday for a thousands of production peaces and projects.
So don't be silly except if you are paid from Atmel to say that everything is good
I know that calculating a hex you can have a binary format but the point is that the AVRStudio must do it for me

anyway thanks again,
Mr. Clawson

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

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

But:

0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111

It's not exactly rocket science is it?

PS If you want 0/1's shown then maybe think about using an unused SFR and watch it in the I/O view?

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

I not sure which window you are watching, but in the register window, if I right click on one of the numbers displayed as a register value, it gives me the option of displaying them as Hexadecimal, Decimal, Ascii or Binary. :D

Laurence Boyd II

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

He was talking about the Alt-1 window.

Cliff

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

Has Atmel already solved this deficiency icarus? I know how to convert hex to bin in my head, but when your head is already full of puzzles, this would spare your brain of something that every emulator in the past have.

Good Soldering JRGandara

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

Hello, 

 

Several years passed from the last comment, and it seems theres no definitive answer, i was looking into this (as it is not obvious) and i imagined that would be really nice if the watch window could display the values in binary / per line and after 10 min of testing and reading, i found out that you can actually do that in AS7 (Atmel Studio 7) in the watch window, to accomplish that, right click in the variable name in the watch window and choose EDIT, after that, add a comma and a letter b to format the output value as binary, you can also set a 'd' and an 'h' for decimal and hex, it's simple but it's not obvious.

 

Hope this helps guys

Last Edited: Fri. May 8, 2020 - 10:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most programmers understand hex so how does binary actually help? You only need to be able to count to 16!

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

I know that, but if you are doing some bitwise operations and want to cross check the values, in my opinion it comes in handy to see that represented already in binary and saves some "brain"cpu, especially if you are tracking more than one variable, saves the time and effort of doing the conversion in head.

 

Besides, if that is already present why not use it. 

 

Einstein said that if you can read it in a book, than it's not worth memorizing it, identical principle applies here ;) just saying.

 

It also helps people getting into assembly and stuff like that ;) because nobody has born an expert until you become one :) lets just say that this applies to the NOT (!) of your first word 'MOST', so, MOST programmers don't need this, but some this may help do you agree?

Last Edited: Fri. May 8, 2020 - 11:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also just out of curiosity and fun, isn't the code in your animated gif missing an include? ;) because you are using the _delay_ms function but the include for that doesn't seem to be called :)

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

I actually find binary confusing and slower as I have to count across the bits. Is that bit 4 or bit 5 which is set?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

Where I want is usually IO registers. I find the IO View (not sure if that is what it is called) is excellent because it identifies each bit. Much better than Watch Window. 

 

One place where I might like binary view is a variable that holds status bits for some process and the states are mapped to individual bits so that more than one can be set at a time. Don't use these very often, but I do use them. The problem, then, is that YOU have to supply the bit meaning. Right there, you loose most of the value of the watch.

 

Jim

 

 

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

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

This is where i found the "need" (because i would skip the convert in head from hex to bin AND do the math) to have the Watch window show the value in bit, as (i assume) the guy that started this post (had some identical need), because i would have to do some eor operations with variables to set io registers. and (to me) i find it easier to do boolean operation with bin instead of hex, maybe easier is not the best word, i find it more meaningful watching the result in bits.

Again some people like bin and others like hex more, this is not a bin or hex fight, or what is "better" or "worst", people think diferently, and some prefere one method and others another method, to convert decimal to hex, AS7 has that as an option thats easely available, i replied to this post with an answer because it was not obvious (as it is with hex) to get the result in bin, and there was not an answer already given.

Of course, this is only usefull to people that actually want the see the result in bin, if this is not most of the guys cases, then keep using hex, i always find it better when you have other options available, even if i don't use them. It always comes in handy in this or that situation

Last Edited: Sat. May 9, 2020 - 09:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PicardJeanLuc wrote:

Also just out of curiosity and fun, isn't the code in your animated gif missing an include? ;) because you are using the _delay_ms function but the include for that doesn't seem to be called :)

Yup. If you can find the thread where I explained how I made that animation you'll see that only after I'd made it did I realise the omission but it was too complicated to try and insert it!

 

PS I think you're only the second person who's brought it to my attention so far ;-)

Last Edited: Sat. May 9, 2020 - 11:17 AM