New Begginer atmel microcontrollers.

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

Hello to the community,

I'm new on Atmel microcontrollers,I know programming in C langauge and I have knowledge about Arduino.

Please I want your direction for first steps at Atmel Studio 7.0 and how programming a microcontroller,a few tutorials etc...

Best regards Kostas.

 

Last Edited: Wed. Nov 11, 2015 - 04:11 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This forum is for Studio problems ie bugs, I'll move the thread.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Sat. Nov 7, 2015 - 08:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks js...

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

You might want to consider starting off with Programmer's Notepad instead. When I started, I couldn't make sense of Studio whatsoever as it contains so many different functions, whereas with PN (which is basically a glorified notepad) I got my first program (never guess what it was ;)) up and running in no time. I'd recommend this site to start off with. It covers a lot of basics, if you're willing to spend a good few hours on the videos...

That moment when you receive a £0.14 crystal in a £0.20 envelope with £0.05's worth of bubble wrap, in an ESD safe bag worth £0.10

(with free shipping)

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

starting off with Programmer's Notepad instead.

This has to be some kind of joke! Are you posting from 2005 or something? Programmers Notepad was great back in its time but Studio 6.2 or Studio 7 is an unthinkably better development environment.

 

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

It's interface is so much simpler though. And Studio is flipping slow on my part (with an i7 running Win7!).

That moment when you receive a £0.14 crystal in a £0.20 envelope with £0.05's worth of bubble wrap, in an ESD safe bag worth £0.10

(with free shipping)

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

But it's not a full iDE - it just launches "make". It's then the programmers responsibility to write a Makefile which is VERY complex or a beginner. An IDE like Studio, on the other hand, auto-generates a Makefile for the user and hides all the complexity. Also Studio has a professional editor with source browsing functionality which makes writing the code a whole lot easier than a simple editor like Programmers Notepad.

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

In that case, I retract my words. I can remember opening up Studio and just thinking "sod" this. I've been using the Mfile application that came with the installation of win avr, and that's not too bad for the makefile. Kinda wish I'd looked a bit more into Studio now..
 

That moment when you receive a £0.14 crystal in a £0.20 envelope with £0.05's worth of bubble wrap, in an ESD safe bag worth £0.10

(with free shipping)

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

Poffman wrote:

You might want to consider starting off with Programmer's Notepad instead. When I started, I couldn't make sense of Studio whatsoever as it contains so many different functions, whereas with PN (which is basically a glorified notepad) I got my first program (never guess what it was ;)) up and running in no time. I'd recommend this site to start off with. It covers a lot of basics, if you're willing to spend a good few hours on the videos...

 

thanks Poffman,

I just read this section form this linh that you upload for me,it's good article:

https://www.newbiehack.com/Micro... but it's better to provide me some new tutorials that support AVR Studio 7.0 or new.Also the hardware that I'm going to need for programming etc...

I write code on C language under Win7 64bit version.

Last Edited: Mon. Nov 9, 2015 - 12:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but it's better to provide me some new tutorials that support AVR Studio 7.0 or new.Also the hardware that I'm going to need for programming etc...

You need to pick an AVR first.  Then load up Studio.  I would not recommend version 7, but 6.2 but thats another story.

 

AS far as hardware goes, you can use the arduino you currently have, and either use another arduino as a programmer, or pick up an Atmel ICE which will give you advanced debugging capabilities.

 

Get a simple LED to blink for your first project, or maybe pass the value of one port to another.  That will show that your hardware is working before you jump into bigger and better things.

 

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

jgmdesign wrote:

but it's better to provide me some new tutorials that support AVR Studio 7.0 or new.Also the hardware that I'm going to need for programming etc...

You need to pick an AVR first.  Then load up Studio.  I would not recommend version 7, but 6.2 but thats another story.

 

AS far as hardware goes, you can use the arduino you currently have, and either use another arduino as a programmer, or pick up an Atmel ICE which will give you advanced debugging capabilities.

 

Get a simple LED to blink for your first project, or maybe pass the value of one port to another.  That will show that your hardware is working before you jump into bigger and better things.

 

JIm

I have some experience on Pic m/c,Arduino,also soon I will receive 3 samples from Atmel:ATMega328P-PU the same as Arduino.

Now,are you suggest AVR Studio 7 or older version?

regards

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

As long as you have a Windows version from Win7 onwards then Studio 7 would be the best place to start. While 6.2 was stable there will have been fixes applied on the road to 7 and you probably want to benefit from those. Also the C compiler in 6.2 was version 4.8.1 while Ctudio 7 has 4.9.2. Again later software has more fixes applied and possibly new/better features so you might as well try and start with "latest".

 

There is a small risk that something in 7 (or 4.9.2 compared to 4.8.1) has actually regressed but I think you have to weigh that in the balance and the other good/new stuff probably out-weighs any potential regression.

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

the AVR Studio includes C compiler free or need to buy the compiler?

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

It includes 6 compilers and 4 assemblers for free.

 

(that is: AVR8 C compiler, AVR8 C++ compiler, UC3 C compiler, UC3 C++ compiler, ARM C compiler, ARM C++compiler then two AVR8 assemblers, one UC3 assembler and one ARM assembler)

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

clawson wrote:

It includes 6 compilers and 4 assemblers for free.

 

(that is: AVR8 C compiler, AVR8 C++ compiler, UC3 C compiler, UC3 C++ compiler, ARM C compiler, ARM C++compiler then two AVR8 assemblers, one UC3 assembler and one ARM assembler)

thanks,already install it....those examples:https://www.newbiehack.com/Micro...

are helpfull for me me...

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

Any suggestion about programmer?

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

I have an "Atmel ICE." I also have an ISP MK 2, but don't use it much any more.

The largest known prime number: 282589933-1

Without adult supervision.

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

Any suggestion about programmer?

As I recommended get an Atmel ICE.  It is both a programmer and debugger.

 

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

Thanks,

opensource programmer/debugger?

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

The Atmel ICE is not open source

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

I mean except Atmel other brand Jim....blush

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

The best Atmel programmers/debuggers are the Atmel ones. While their are 3rd party (some "open source") debuggers that's possible because Atmel make details of their ISp programming protocol public so others can implement clones. They do not make details of their debugger protocols public though some parts have been reverse engineered. In Linux the software that connects an Atmel debugger to avr-gdb is "avarice" and it has the ability to drive some of the Atmel debuggers though Atmel have a nasty habit (though I don't think it's a deliberate act) of changing the firmware in their debuggers from time to time. So you need to check whether avarice is able to drive any particular debugger you may be about to try and use. It may be necessary to connect it up (briefly) to Windows and Atmel Studio simply to arrange for it to have the "right" version of firmware loaded.

 

if you are only interested in programming and want completely "open" then go with a $3 USBAsp from ebay and drive it with "avrdude" built for Linux.

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

clawson wrote:

The best Atmel programmers/debuggers are the Atmel ones. While their are 3rd party (some "open source") debuggers that's possible because Atmel make details of their ISp programming protocol public so others can implement clones. They do not make details of their debugger protocols public though some parts have been reverse engineered. In Linux the software that connects an Atmel debugger to avr-gdb is "avarice" and it has the ability to drive some of the Atmel debuggers though Atmel have a nasty habit (though I don't think it's a deliberate act) of changing the firmware in their debuggers from time to time. So you need to check whether avarice is able to drive any particular debugger you may be about to try and use. It may be necessary to connect it up (briefly) to Windows and Atmel Studio simply to arrange for it to have the "right" version of firmware loaded.

 

if you are only interested in programming and want completely "open" then go with a $3 USBAsp from ebay and drive it with "avrdude" built for Linux.

 

thanks clawson,

the AVR MKII from Atmel I think is one-way for me to avoid problems cause my software is Windows 7 64bit for now.

AVR MKII is very easy to buy it from here at local electronics stores...smiley

 

Last Edited: Wed. Nov 11, 2015 - 09:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well to be honest I see no point whatsoever in buying an AVRISPmkII in this day and age.

 

Either you do go with Atmel in which case Atmel-ICE is the thing to buy and you get both programmer and debugger.

 

Otherwise there's no point spending $30..$50 on a device when might as well spend just $3 to get a USBAsp on ebay.

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

I see no point whatsoever in buying an AVRISPmkII in this day and age.

Particularly since it has been discontinued for a while now. wink

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Are you suggesting Atmel-ICE to buy as final solution farther?

Now,on ebay find this USBAsp as handy solution,is good?

thanks

Last Edited: Wed. Nov 11, 2015 - 09:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gr_Dinos wrote:
opensource programmer/...
USBasp already mentioned.

AVRISP mkII clone - Olimex has one (FOSS and OSHW).

Bus Pirate - via AVRDUDE loader, or, like a STK500 (FOSS and OSHW).

OpenOCD - last commit that's AVR appears to be in year 2013.


Thomas Fischl

USBasp

USB programmer for Atmel AVR controllers

http://www.fischl.de/usbasp/

...

Official USBasp product by MSX

A portion of each sale goes to this project!

(9.90EUR + shipping)

...

www.olimex.com

AVR-ISP-MK2

https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/open-source-hardware

Dangerous Prototypes

Bus Pirate

AVR programming

http://dangerousprototypes.com/docs/Bus_Pirate#AVR_programming

http://openocd.org/doc/html/Flash-Commands.html ("Flash Driver: avr")

Edit : USBasp page, creator's name.

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

Last Edited: Thu. Nov 12, 2015 - 01:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks gchapman,

bus pirate

impress me with all futures that provides..

AVR programming

The Bus Pirate can be used to program Atmel AVR microcontrollers. AVRDUDE version 5.8 and later support the Bus Pirate as a programmer directly. AVRDude is the most common software for programming AVR microcontrollers. Many packages such as WinAVR and the Arduino IDE bundle a version of AVRDude.

There is also an alternate firmware that can be installed on to Bus Pirate to make it an STK500 v2 AVR programmer clone.

but is for Linux with compilation AVRDude...sad

Last Edited: Thu. Nov 12, 2015 - 09:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The options are this:

 

1) programmer only - none Atmel: get 3rd party like USBAsp

2) programmer only- Atmel: get Atmel AVRISPmkII

3) programmer+debugger- none Atmel: there are no sensible 3rd party options as Atmel don't publish details - you will find some "3rd party AVR debuggers" but these are clones of Atmel's original device (15 years ago) which had an open design and they can only debug about 10 different AVR which were the debuggable ones 15 years ago. Bottom line: forget it for a 3rd party debugger there effectively are none.

4) programmer+debugger- Atmel: get Atmel-ICE

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

clawson wrote:
Atmel-ICE

Atmel-ICE

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

Yes, that link is what the Atmel-ICE looks like :-)

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

clawson wrote:

Yes, that link is what the Atmel-ICE looks like :-)

yessmiley

 

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

Last question,

can you suggesting some online shops to buy Atmel-ICE,Europe option is better for me...yes

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

You linked to Farnell already - they ("Element14") have suppliers in almost every European country. RSComponents would be another one to try.

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

Gr_Dinos wrote:
but is for Linux with compilation AVRDude...sad
AVRDUDE is mentioned in the Visual Micro documentation.

AVRDUDE can be invoked from Atmel Studio.

There are builds of AVRDUDE for Windows and instructions on how to build it for Windows.


Visual Micro - Arduino IDE for Visual Studio

Visual Micro

Arduino IDE for Visual Studio and Atmel Studio

How the Software Tools Work Together

http://www.visualmicro.com/page/User-Guide.aspx?doc=How-The-Tools-Play-Together.html

...

The  gcc toolchain  consists of all tools that run in the background if you select "build" or "upload" commands.
These are mainly the gcc compiler and linker and the upload tool (normally avrdude.exe)

...

AVRDUDESS contains a version of AVRDUDE built for Windows :

Zak's Electronics Blog ~*

AVRDUDESS – A GUI for AVRDUDE

http://blog.zakkemble.co.uk/avrdudess-a-gui-for-avrdude/

http://savannah.spinellicreations.com//avrdude/avrdude-doc-6.1.pdf (bottom of page 42 for "A.2 Windows")

Edit : AVRDUDESS

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

Last Edited: Thu. Nov 12, 2015 - 03:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks gchapman,

I'm going to read the quidelines...enlightened

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

 Hi,

finally Ι bought this device:

USBASP USBISP 3.3V / 5V AVR Programmer USB ATMEGA8

from ebay to test my skills first...

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

Hi boys,an update:

today I receive a second hand AVR JtagIce3 and try to learn it...yes

Can you suggest me a quide how to use it to overpass any problems...thanks for your help!!wink

 

Last Edited: Wed. Aug 10, 2016 - 07:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

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

 

thanks...wink