| Author |
Message |
|
|
Posted: Jun 09, 2012 - 10:49 AM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: Jun 09, 2012 - 12:33 PM |
|


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. |
_________________
|
| |
|
|
|
|
|
Posted: Jun 09, 2012 - 12:40 PM |
|


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
|
| |
|
|
|
|
|
Posted: Jun 09, 2012 - 02:12 PM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: Jun 10, 2012 - 01:21 AM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: Jun 10, 2012 - 08:37 AM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: Jun 16, 2012 - 08:40 PM |
|

Joined: Aug 12, 2011
Posts: 44
Location: Pakistan
|
|
| thx i made it. I have licensed copy. took some time to read mannuals and googling... |
|
|
| |
|
|
|
|
|
Posted: Jun 16, 2012 - 09:09 PM |
|

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. |
|
|
| |
|
|
|
|
|