Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
engineer.pk
PostPosted: Jun 09, 2012 - 10:49 AM
Rookie


Joined: Aug 12, 2011
Posts: 44
Location: Pakistan

I want to know

1. how to make ISRs (interrupt service routines)
2. what should i include in header files.
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jun 09, 2012 - 12:33 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62324
Location: (using avr-gcc in) Finchingfield, Essex, England

Did your copy not come with a user manual? I know that both questions would be answered by that and I don't intend to simply retype sections of the manual here.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
bobgardner
PostPosted: Jun 09, 2012 - 12:40 PM
10k+ Postman


Joined: Sep 04, 2002
Posts: 21269
Location: Orlando Florida

Some folks learn by studying an example. If you could find an example of a small complete compilable project written using the IAR compiler, you might see that is would be easy to edit it to compile for the Atmel mega16. I'm sure there are some example applications in the compiler directory tree. Finally, if you search the projects section here, there might be some IAR projects. There are many more projects for the gnu winavr gcc c compiler. Have you considered using this compiler and Atmelstudio to compile your c programs?

_________________
Imagecraft compiler user
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
david.prentice
PostPosted: Jun 09, 2012 - 02:12 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16320
Location: Wormshill, England

You need to ask yourself two questions:

1. Do you intend to write real applications using > 4kB flash?
2. If so, are you or your boss going to pay $3000 for a license?

If it is yes to both (1) and (2), go for it.
If it is no to (1), go for it.

IAR comes with virtually no example code.
Most Atmel app notes will compile with IAR but probably with difficulty. IAR changes the project format every few minutes!

If your answer to (2) is ok if $200 or $249 for a license, look at CodeVision or ImageCraft.

Otherwise, you should learn the avr-gcc tools that are free. (as used by Atmel Studio )

Yopu will have masses of examples, experience and help from this forum. All the same, you must be prepared to do some work yourself. e.g. you study some example ISR programs --- then ask specific questions.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
stevech
PostPosted: Jun 10, 2012 - 01:21 AM
Raving lunatic


Joined: Dec 18, 2001
Posts: 4716


Quote:
IAR comes with virtually no example code.
... IAR changes the project format every few minutes!
My experience has not been that. The .eww structure hasn't changed in the 3 years I've used it.
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Jun 10, 2012 - 08:37 AM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16320
Location: Wormshill, England

Try compiling Atmel app notes then.

IMHO, IAR is an excellent compiler. C-SPY an excellent debugger.

If you are making cutting-edge AVR products for a living, it is an excellent choice of Tools.

I have used the IAR 'WorkBench' for ARM, Renesas, (and Mitsubishi). The IDE and tools work in a consistent fashion so it is easy to migrate from one chip to another.

If your AVR product is 7kB in size, no clever tool will squeeze it into a 4kB chip. Likewise few applications are time critical. e.g. if GCC takes an extra 1ms to run your app, will the client notice?

Evaluation and Demo software is a good way of trying out software. However you need to be realistic. If your requirements are too big for the Demo and the cost of a license is outside your budget, there seems little point in wasting your time.

There is a substantial learning curve for GCC or any other set of tools. IMHO, a student needs to budget her time as well as money.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
engineer.pk
PostPosted: Jun 16, 2012 - 08:40 PM
Rookie


Joined: Aug 12, 2011
Posts: 44
Location: Pakistan

thx i made it. I have licensed copy. took some time to read mannuals and googling...
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Jun 16, 2012 - 09:09 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16320
Location: Wormshill, England

In which case it is worth the struggle to understand IAR.

It produces excellent code, but has only got a few users here.

Of course you can get help directly from IAR.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits