Learning Atmel studio 7

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

Hi guys.
I want to start learning Atmel studio 7.
Can you please introduce me a good book or video or anything else for tutorial?
Thank you.

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

Google.

 

jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

ssrma_lover wrote:
learning Atmel studio 7

Note that if you're just starting, it's now called Microchip Studio.

 

What, exactly, do you want to learn?

  • Are you already familiar with any other IDE(s)? They all do basically the same thing, and in very similar ways
  • Are you already familiar with programming embedded microcontrollers in C or C++ ?
  • Are you already familiar with programming in C or C++ in any other context?

 

There's a load of introductory videos on the Microchip Studio page:

 

https://www.microchip.com/en-us/development-tools-tools-and-software/microchip-studio-for-avr-and-sam-devices - scroll down to the end

http://alexandria.atmel.com/keyword/ATMEL.VSIDE.AVRSTUDIO.GETTINGSTARTED/redirect

 

https://onlinedocs.microchip.com...

 

 

And Microchip's YouTube channel: https://www.youtube.com/user/MicrochipTechnology

 

It's good to remember that Microchip Studio is built on Microsoft Visual Studio - so Visual Studio training & reference materials are often applicable; eg,

 

https://visualstudio.microsoft.com/vs/support/

 

If you're not already familiar with C or C++ programming, using one of the free VS editions on a PC would probably give a better learning experience - rather than also trying to battle with the added constraints & complications of small embedded microcontrollers at the same time.

 

#AS7GettingStarted #MS7GettingStarted

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 22, 2021 - 09:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks pal it was so helpful🙏🏻

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

I started with Studio about 40 years ago, then it was called a monitor program. cool

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

ssrma_lover wrote:
I want to start learning Atmel studio 7.
Can you please introduce me a good book or video or anything else for tutorial?
Atmel have a Youtube channel with a number of Studio videos.

 

But, as Andy asks, I think you have to be a little clearer about what aspect it is you want to learn. For example do you already know C and embedded (and perhaps even GCC) and just want to know where in the AS7/MCS7 user interface they have placed some of the GCC controlling build switches? Or do you want to know about how the debugger/simulator works? Or is it about actually learning C (something best not done in Studio 7!)? Or is it about how to apply an already proficient knowledge of C/C++ to embedded micros (like how do you handle interrupts etc etc) ?

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

awneil wrote:
Are you already familiar with any other IDE(s)? They all do basically the same thing, and in very similar ways

clawson wrote:
Or do you want to know about how the debugger/simulator works?

That's probably the biggest area where different IDEs are significantly different.

 

And, if you're talking on-target hardware debugging, that in itself varies greatly with different chips.

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

I actually want to know about the debugger and simulator

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

So have you started with the Microchip videos and the documentation site ?

 

After that, what specifically do you need to know ?

 

Are you already  familiar with the general concepts of debugging - stepping, breakpoints, using a debug probe ("ICE") to connect to the target, etc?

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


OK so what aspect of the debugger? Do you simply want to know how to start it?

 

Quick tour: First here is the simplest of AVr programs:

I'm going to build for mega16. As I don't actually have one connected to the PC I will simulate it instead. First thing to do is to tell AS7 (quicker to type than MCS7!) that I want to use simulator so next to the little tool symbol it currently shows that no debugging tool is set so if I click "None on" I get to :

 

 

If I click the drop arrow for Selected debugger/programmer it just shows a couple of options (I don't currently have any other debugger/programmer plugged into the PC but if I did and they were recognized by AS7 they'd be listed here to). Anyway the selection I want is "Simulator".  Having selected that, back at the program I can go to the Debug menu and select "Start Debugging and Break". That will make sure the program is building OK, then it will start my chosen program target ("Simulator") and load the code into that. It then simulates execution of the code but with a breakpoint at the top of main() so all the early C code before main() will run but it will then stop when it gets to the first line of main(). What I see is:

 

So the program has run for 13 (simulated) machine cycles but the highlighted line and yellow arrow show me it has stopped at the first line in main() where it is about to make a write to the DDRB register. If I want to see that happen I can look at the "I/O" view. Usually visible by default but if now access using Debug-Windows-I/O:

 

 

That shows:

 

 

The thing I am interested here (because it's what my program is working with) is "I/O Port (PORTB)" so if I select that:

 

 

The lower window now shows the registers associated with PORTB. As it stands at the moment the value in all is the power on default value of 0x00 (the simulator fully simulates all that is in the AVR and this is exactly what the state in real AVR would be too).

 

Now we want to make the code run and see what happens. So look to the menu bar and you see:

 

 

I've blown this up and added labels. Of these three "Step" means "Execute one line of C then stop again". The "Step Over" one comes into play when you are running code that has calls to other functions. If you get to a function invocation and "Step" the execution will "go into the function" but if you just want to say "go away and run that whole function then stop again when you get back" you use "Step over". If you ad followed it into a function call but then realise you are not interested by what is going on within that function but just want it to complete the function, return to the point after the function call and then stop you use "Return".

 

For now just click Step and one line ("DDRB = 0xFF;") will be executed (simulated). So doing that leads to:

 

So the yellow highlight/arrow has moved on which means it has performed the write to DDRB. You can see that in the IO vide because the contents of DDRB have changed from the previous 0x00 value to the newly written 0xFF value. Between one stopped execution and the next Studio draws anything "just changed" in red. So that's why the 0xFF in DDRB is shown in red.

 

The program has now reached line 11. That line will XOR the contents of PORTB with 0xFF (XOR means "flip the bits" so 1's become 0's and 0's become 1's). So if I make one more step there should be a change in the PORTB value this time. It's currently 0x00 (00000000) so after the instruction it should switch to 0xFF (11111111):

 

 

The previously red DDRB content has gone balck (ie it did NOT change this time) but now the contents of PORTB (and because it is seen back as the input too, PINB) have changed so they are in red and show the values in those are now 0xFF (11111111). The yellow arrow is still on line 11 because it's the only line in the while(1) loop so the code has simply cycled back to the same line. Each time it is stepped the contents of PORTB (and PINB) will switch state. So if I step again they should go to 0x00:

 

Each time I step from now on PORTB/(PINB) will just keep flipping between 0x00 and 0xFF which basically goes to show us how XOR works - which is kind of the whole point of this particular C program.

 

So it shows how the things works and it also proves that it does seem to be working OK. So if I was now to build this same code and program it into an AVR I might expect to see the same behaviour in a real (not simulated) AVR. Of course I couldn't really "see" it (well not without an oscilloscope/logic analyser) because when this runs on a full speed micro the 0x00/0xFF switching will happen so fast it will be at a rate of 100's of kHz or even MHz depending on the clock speed of the actual AVR.

 

But hopefully this is enough to show how to get started ?

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

BTW this is the Microchip/Atmel channel on Youtube:

 

https://www.youtube.com/channel/...

 

They have a sequence of "getting started with Studio" videos. The sequence (10 or more episodes) starts here:

 

https://www.youtube.com/watch?v=...

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

 

 

in #3, awneil wrote:
There's a load of introductory videos on the Microchip Studio page:

 

https://www.microchip.com/en-us/development-tools-tools-and-software/microchip-studio-for-avr-and-sam-devices - scroll down to the end

 

So here:

 

 

and, as clawson mentioned,

 

 

and

 

 

etc, etc, ...

 

 

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 22, 2021 - 10:19 AM