Imagecraft vs CodeVision

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

Hi.

Have anyone tested both Imagecraft and CodeVisions compliers? I just got a question of wich is best and I have no idea. I think both is very good but imagecraft have been out for longer time. (I use Imagecraft myself).

If anyone could aswer the following it would be nice:

- How is the code efficiency?
- How is the overall usage? Simple, complicated, bugs?
- CodeVision has a lot of drivers in a library. Are they so useful that is is a big advantage to have them?
- How is the support? (Imagecraft is excelent)

/Bengt

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

I brought the Imagecraft C compiler, and was impressed with the fact I'd never used and AVR and within 1/2 hour I had LEDs running back and fourth on my STK300. I saw the codvision compile later and I must say I do like the IDE and the built in functions.

If I was going on looks then I would have gone with the CodeVision, but I never really got to test it properly as the demo is limited to 1k and you cant test much with 1K. Imagecrafts 30 day fully functioning demo allows you to really try things out, also you get a fully printed out manual with imagecraft. The codevision one I had to print and it is a few hundred pages.

I’m not sure about code size, but one of the biggest things I would have to say is that Richards e-mail support is fantastic ( I can’t stress that enough ) even in the middle of the night and weekends.

I also would be very interested to here from people with a lot more C experience than me ( Not Hard ) what they think.

One down side to both compilers is this licence disk AHH.. Imagecrafts has some weird format so you can’t copy it. The code vision you can copy it but it is machine specific I think.

I had a problem with my PC it crashed while I was transferring my licence from floppy to PC. After I rebooted, my licence disk was empty but the PC did not have it either. This filled me with horror (especially if I had a demo to do and Richard was ill or working else where (he’s not allowed holiday)) again I must say Imagecrafts response was first class and I have a new licence number within ½ hour. Richard then very kindly let me have another licence as a backup just in case.

Patrick

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

Hi,
Okay, this isn't c :) I use BASCOM-AVR, yes its not either of thoese ;) It is really good to use, and there is a mail list to support it, it is really good! At $70, price is good too, best money I ever spent!
-Colin

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

I heard that Codevision has been out longer than ImageCraft for AVR compiler. I am still trying to decide which one to purchase, so far I'm leaning towards Codevision.

My experience with codevision support is fantastic and I'm using the free(demo) version. Their IDE is very nice and also it has good built-in library. So for it works out pretty good for me.

Imagecraft support to me so far is bad to none, maybe because I'm using a demo version which btw has expired before I got a change to try much(use it once). I tried to get a copy of the manual in pdf, they send me one but it was truncated on the right side (can't read), I email them the fact and requested for another copy, never get an answer(till the demo expired).

You are right Colin, BASCOM, yes it's GOOD. I have both the 8051 & AVR.

Yungky

admin's test signature
 

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

I have bought ImageCraft and I am very hapy with this. ImageCraft is really ANSI C. There is no problem try partiones of code on the PC. However there are some constrains by this feature (This means bit access and something like this). But code efficiency is excelent.
I do not like CodeVision feature to gather all the code to one asm file.

admin's test signature
 

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

First of all, ICCAVR from ImageCraft is the 2nd commercial C compiler for AVR. IAR has a 3 year headstart, but ours came out before other compilers.

Second, our printed manual is the same as the WinHelp file, and we don't really have a good .PDF formatted version. I get literally hundred of email a day so I think I have forgotten about your 2nd email. I apologize for that. I believe I have said that if you cannot find what you need from the WinHelp file, feel free to email me. Just because you are not a customer, I do not penalize and not answer email because of that. The offer still holds of course, so if you want to play with our demo again, just let me know and I will give you another license code.

// richard

Richard Man http://imagecraft.com

Beyond Arduino - When you're ready to get serious...
JumpStart C Tools, The Better Alternative.

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

Hi,

I tested both some months ago. The CodeVision generated smaller code than ImageCraft. But the ImageCraft generated program structure and style was more clearly to me, then in CodeVision. May be the different parameter passing makes the different speeds.

A.

p.s.: Jim, did you test the piece of code on PIC18C452?

admin's test signature
 

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

Hello,

Regarding compilers release date and priority.
V1.0.0.6 was the first commercially available version of CodeVisionAVR
in July 1999.
Beta versions were of course available earlier than this date.

Regards

Pavel Haiduc
HP InfoTech

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

About a week ago I was in the process or purchasing CodeVision. Then I found out that it was copy protected.

Back in the 80's I had some real headaches with copy protected software. At that time I promised myself, unless I absolutely had to I would never be put in that state of vulnerability again. To this date I have never had to use and depend on copy protected software. Thanks God.

Mike Bronosky

admin's test signature
 

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

I don't like copy protection either.
Unfortunately we don't live in a perfect world and we must somehow protect
our work, or sell our products at extremely high prices to cover loses from
illegal copying.
As far as I know other compiler providers use the same approach.
To help somehow our customers we provide, on request, an additional free license for a notebook or home PC.

Kind regards

Pavel Haiduc
HP InfoTech

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

Hi All,

As programmer, new to C (have done assembler for a decade), I have had the privilige to test both IAR and CodeVision. IAR is still the best code-effective complier, but their PRICE and service is totally way off. Not to mention all of their hopeless setup parameters

I have worked with CodeVision for quite some time now, and what a releif: Not only is the code-effenciency continiuosly improved, but the libraries are expanded and works wonders.

One of the things that ImageCraft is missing is the I/O bit-manipulation which is execellent in CodeVision.

I have pursuated more and more ImageCraft users to test CodeVision, and they do not want to step down from CodeVision.

If you have an interest in HomeControl, I'm designing a major project using Atmel micro's and code is written in C, using CodeVision. Code will be FREE as I want to share, provided you send me feedback for new ideas.

Please visit: http://home6.inet.tele.dk/Lindgard and join UserGroup.
Let's get this moving for the joy and benefit of us all.

Regards,
Michael

admin's test signature
 

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

Recently I was placed in a situation to evaluate the "big three" (IAR, Imagecraft, and CodeVision) AVR compilers. We are teaching a new course at the University of Wisconsin (a course in Mechatronics) that will feature the AVR and we wanted an efficient, easy to use, full featured, AND INEXPENSIVE C compiler. For benchmarking purposes we wrote a general purpose PID controller loop (floating point multiply and accumulates) and compared code size and execution speed. We ended up selecting the CodeVison compiler because the PID code ran 30% faster than the IAR verson (Yes I actually programmed a part and toggled an IO pin each loop iteration and measured it with a scope). The CodeVision code was definitely more compact than IAR and a little better than Imagecraft. Several important features for us as an educational institution were the bit manipulation support, the libraries (LCD, SPI, UART, Delay,...), the code speed. Another major concern was the compiler cost since we needed to outfit the entire lab with a legal copy. At $150 for the full blown compiler with 90S and mega support it was hard to beat. Based on "code merits versus cost", Codevision was the best bang for the buck. IAR was a nice user interface with pretty code fragments but it is definitely not worth even as much as the Imagecraft price tag. The Imagecraft and CodeVision compilers provided very similar capabilities and results. But the CodeVison pricing made it almost a no brainer for us. The technical support I personally received from all 3 vendors was pretty good. Since we purchased CodeVision about 1.5 months ago I have dealt with Pavel Haiduc on a variety of issues and he has provided exceptional support. Day or night, weekday or weekend.

The moral of the story for our types of applications is: CodeVision has excellent code size, excellent excellent code speed, excellent support, avariety of peripheral libraries, and the absolute best pricing.

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

OK, some points to ponder:
- First commercial release of ICCAVR is May 1999.

- The core floating point routines were generously donated to me by an amazing soul. Said routines are in the CV compiler also. So the core FP add/sub/mul/div routines have the same speed. This is why IAR is slower in this case. Currently we do a little more data shuffuling for the FP expressions, so the test program shows degradation. We will address that.

- C is case sensitive, the AVR Studio assembler is not. While one may debate the merits of Case Sensitivity in a computer language, not having support in the assembler level means incorrect C programs may get accepted and vice verse. While this may be a "who care?" to some, imagine beginners learning slightly non-standard dialect of C.

- IO instructions. One does not need special IO instructions to generate optimal AVR code. Using ANSI C syntax, you can write
PORTA |= BIT(0);
if (PORTB & BIT(1)) ...
etc. and our compiler generates the optimal in, out, sbis, sbic, etc. code. We believe a compiler should adhere to the standard as much as possible, unless absolutely necessary need to deviate from it (e.g. pragma for interrupt handler etc.) I have helped move 40K code from IAR C to ICCAVR with no more than 10 lines changed, all from the interrupt handler syntax. The same code can probably be ported to GCCAVR with also minor changes.

- Copy Protection. For the US and most modern markets, the software protection scheme we use allows seamless updates of the products by the customers downloading the latest demo. BTW, we do not charge almost full price for update renewal after a year, we charge a minimal amount of $30.
// richard

Richard Man http://imagecraft.com

Beyond Arduino - When you're ready to get serious...
JumpStart C Tools, The Better Alternative.

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

Hello,

I must clarify a point regarding I/O bit manipulation:

CodeVisionAVR generates optimal code for both standard C syntax and our extensions to the standard.
We added these extensions just to improve program readability.
You can very well stick to ANSI C and CodeVisionAVR will generate the optimal code using sbis, sbic.

The second point is regarding the marketing strategy and copy protection:

- we offer 12 moths free updates and tech support for the Standard version of CodeVisionAVR
- the compiler is indeed copy protected, but we offer additional free licenses for a notebook or home PC
- the update to the latest version the client needs just to make download from our web site and install it, as simple as that.

Regards

Pavel Haiduc
HP InfoTech

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

We purchased Codevision 9 months ago after doing a quick comparsion with ImageCraft. The two things that made the decision for me was the simple bit handing(ie the I/O line manipulation) and the all important price.

Since I didn't spend much time with ImageCraft I can't comment on its code generation or support, but from what I've read from above its support is as good as Codevision which is excellent.

Twice I've had to get new licences(free) for Codevision as I had problems with my hard drive in both cases Pavel was very responsive.

The CodeWizard reduces the writing of hardware initialisation code from hours to minutes. Once you have used it you will never go back. I like the way it generates all the function headers and comment fields. Finally embedded compilers have development enviroments that are up there with the likes of Dephi and Microsoft Basic.

Its nice to see that Pavel is continously enhancing the producting, averaging 1-2 new releasings a week. So the code generating is continously getting faster and more compact, plus he is expanding the libraries (can be very useful eg I2C, LCD module drivers). I can't praise the product enough and at the price there is no reason to be writing code in Assembler.

admin's test signature
 

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

Many good things have been said about Imagecraft and CodeVision.

I have not tried CodeVision, but feel that since they don't support the ATtiny12/15 Imagecraft wins. With the support and work that Richard is putting in to such C compilers, I feel that they are the choice of mine.

I converted a design written in assember code for the PIC16C505 to the ATtiny12 written in C with the ImageCraft ICCtiny compiler and it worked great, and took less than a day to do.

Since Imagecraft support both ATmega, AT90Sxxxx and the ATtiny range with their compilers, I feel that they are the best choice with a similar standard IDE that works fine with me.

So what about the support for the SDK500 in the IDE's. One still should try and use the AVR Studio to simulate before downloading code to a physical device. Downloading code to a device to try sometimes makes sense if the simulator does not support it, but simulation is better. You can debug code very nicely and view registers and variables and IO ports. This point comes from my experience in designing and simulating FPGAs. I use the Actel FPGAs and they are OTP devices. Every time my designs have worked first time because of software simulation.

Wait for Imagecraft ICC-AS1 programmer! I'm sure that will be incorporate that into the IDE!

Steve

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

I own both of these compilers and the Imagecraft version was a wast of money at the time the copy protection made it unusable i got tired of emailing richard
for new keys .. and it just sits on the shelf
as for codevision i have been using it for about a month and it is very smooth to use and the support is great . I had a virus on my only windows machine and
it messed up the key file for codevision and i email them and had a new key in less that 10 minutes so i would say save your self some money and buy codevision the imagecraft one is not worth it IMHO.

ken segler
aka codeman
www.linux-hacker.net

admin's test signature
 

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

That's interesting. Did I not reply to your messages promptly also?

You bought your compiler in 1999, I do not keep records of email that far back so I don't recall any details. I'm sorry you are dissatisfied with it. If you are still in your Las Vegas address, let me know (privately at richard@imagecraft.com is fine too) and I will send you a refund check.

// richard

Richard Man http://imagecraft.com

Beyond Arduino - When you're ready to get serious...
JumpStart C Tools, The Better Alternative.

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

I have been using CodeVision for about a year. I am completely happy with it and I have not found any bugs. It is a great work.

Richard D. Gill

admin's test signature
 

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

Hi Jim,

the PIC18 can run at 10MIPS @10MHz and PLL on. The instruction set is very similar to AVR, so when an really good compiler like CodeVision for AVR appers on market, there will be minimal difference.

A.

admin's test signature
 

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

All,

Just my views on codevision..

firstly the email support from pavel is not only superb, but its quick and effecient.. when I have had a program that wont compile (im new to C) Pavel kindly offered to look at the code, I emailed it to him, and it arrived back he following day fixed, and often with a couple of suggestions for improving the code.

Secdonly, the cost, I am a hobbiest, I do this for fun, so Imagecraft lost points there for me straight away!! Codevision is MUCH cheaper, this may not be an issue for corperates, but for me it was.

Thirdly updates, updates for CV are easy to get and install and Pavel ALWAYS sends an email letting you know they're ready to download.

Fourth,Copy protection. I agree that its a shame to need it, but you do if you want to stay alive in this buisness.. The copy protection is a KEY generated on sinatll of the program, you email the number to pavel and he emails you a license file.. During SEVERAL system rebuilds (damn windows NT) I have had NO problem in getting a license file quickly and without fuss from Pavel. and to my mind this beats a dongle EVERY time!

Fith, the IDE. Simply its great, its clear and easy to use, its also simple.

sixth, Any suggestions you make about improveing the compiler are taken on board by pavel, and if they're good sensible ones (not somethig Ive suggested tahts already there and I, to dumb to see it) he'll implement it... Haveing the support from the guy who wrote it cant be beaten.

Finally I have taught myself C from scratch in just over a year, I have had pavels CVAVR for most of this time and I am VERY impressed with it, enough to suggest to my synth building friends that if they go for an AVR CVAVR is the compiler they should use..

Ive not used anything more than the eval version of ImageCraft so I cant comment on support and so on, these are just my views based on my experiences with CVAVR..

Paul Maddox
Marco,

The other thign you could do , if its a radio, ia combination of Grants idea and an additional idea.

Read the value from your tuneing dial (assuming this is what you want to store) then if the value is different to eeprom value AND the new value hasnt schanged to 10 seconds then write to the eerpom.
In this way you write when a value has changed but only if its not constatly changing (ie, tuneing in a new station).. I would imagine you may be able to increase the 10 seconds, as after tuning in a station you would listen to it for longer than 10 seconds before turning off the receiver.
so anything up to a few minuets would be ok..

Paul Maddox

Http://www.wavesynth.com/

admin's test signature
 

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

I have a concern about ImageCraft and CodeVision because they do not seem to have a linker. This would be a problem for me since I like to fill unused memory with nops and place checksums and id info at the end of flash. I have an old “beginners” IAR compiler, which cost $200 several years ago. It fills unused memory automatically. It also will automatically calculate a flash checksum of a type chosen by you, and place it in flash where specified via the linker. I know that IAR still sells a “limited” compiler, which should cost much less than their full-blown version.

For me, not having these functions would be a substantial burden. I attribute the ability to perform these functions to the linker. Am I missing some subtleties of ImageCraft and CodeVision that would allow me to perform the same functions without multiple compilations?

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

Geneo,

Maybe Im just being daft, but could you just use the .ORG command? followed by a .EQU?

Paul Maddox

admin's test signature
 

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

What a long thread :-)
To Geneo:
ImageCraft ICCAVR definitely has a linker :-)! We have our own fully relocatable macro assembler and linker. You also can fill unused memory with ANY pattern you specified (the default being 0xFF). We have users who do the checksum themselves and we are considering adding the feature to the linker directly.

To Jim:
Regarding the GUI prettiness - we are working on improving that as we speak. Watch our space for details. Ditto for library functions for LCD/I2C/1-wire etc. Oh yes, the Application Builder will be adding the Delay type functions soon too.

// richard

Richard Man http://imagecraft.com

Beyond Arduino - When you're ready to get serious...
JumpStart C Tools, The Better Alternative.

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

Regarding these two compilers,
I purchased both compilers and quickly settled on CodeVision and I am glad I did.
I too had trouble with the mickey mouse method of license 'files' you get with the people
in California. You get real files from the man in Romania. I believe that was enough to get me looking elsewhere. My project requires frequent access to I/O devices and CodeVision
wastes no time getting the job done. As I recall, access to eeprom and flash is much cleaner
with CodeVision.

Here is what you need to know. Pavel Haiduc supports his compiler better than anyone, amen.
Whenever a problem arose, Pavel had it fixed in record time. Because of this, my project
is going to hit the streets in record time. If I had chosen the wrong compiler, it would be
me hitting the streets.

The fact that the CodeVision compiler doesn't use a separate linker means that you get your
code running that much quicker. I see this as a plus. Since the compiler creates one C file
before compiling, I wrote the code to do the same. My main C file includes all the xxx.h files,
then prototype.h and finally all the xxx.c files. This worked out just fine. The compiler and the
Atmel assembler leave behind a single listing file so you know exactly what code is running.

Save yourself some money, do what I did.

Glenn Rogers
Diagnostic Software Engineer
Computer Network Technology

admin's test signature
 

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

I don't know why so many of you are having problems with the licenses.
you install it, run it, back it up, what is problem ?

to kinda slam one program over this issue seems childish. I would ask any of you this question. If you wrote a piece of software wouldn't you protect it ?
and keep people from buying one copy and making a half dozen?

if you answer is yes then stop complaining about it.

admin's test signature
 

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

Jimbo is right, I have no right to slam anyone.
I retract my negative statements.
glenn

admin's test signature
 

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

I don’t think anyone is slamming Richard or Pavel for protecting their software. I have been transferring my licence file from floppy to the PC when W98 crashed. After the reboot I had lost my licence file altogether, my concern and I suspect others, if Richard or Pavel were ill or on holiday etc. This could delay in getting a new licence file. I for one sometimes have tight time scales and often have to make changes in software for individual customers over night. It has been said just back it up, the Imagecraft licence is a strange format so can not to the best of my knowledge be backed up, Richard very kindly let me have another licence which is kept in a fire proof safe in another office for emergencies.

Patrick

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

re: protection

We will be adding two additional protection support:
1) a web based "emergency license." You enter some data, and it will mail you a temporary license.
2) For "emerging markets" such as Russia and China, we will be in addition supporting a HW dongle. This will be also available to anyone who wants HW protection instead of SW one. For some reasons, some European customers seem to prefer that.

re: listing file
Having a linker does not prevent a listing file from being generated. We generate a full listing file showing all the codes.

re: support
I do have to agree Pavel supports CV better than anyone else can support CV :-) I certainly cannot support CV :-)

We have plenty people who are shipping products using ICCAVR as well and not on the streets.

Anycase, it is fair to say that lots of people like CV, and lots of people like ICCAVR. I'm sure there are plenty of fans for GCCAVR as well. One thing though is to keep in mind is that this forum, while popular, does not represent all the opinions of AVR users. For example, while many can raise issues and problems with the IAR compilers, I'm sure IAR is doing just fine with their AVR compiler sales. Regardless of whether it is a wise choice or not, they too have their fans.

Obviously there are always rooms for improvements. I wills strive to address customers' needs and criticisms.
// richard

Richard Man http://imagecraft.com

Beyond Arduino - When you're ready to get serious...
JumpStart C Tools, The Better Alternative.

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

I need to add one last comment.
The cost of these AVR C compilers enables anyone to evaluate them and make up your own mind. If this code ran on a UNIX system, you might buy the manual for what these people are asking for these compilers. They both generate code for the AVR products which are a step above the rest.

glenn
www.smartrails.com

admin's test signature
 

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

Got to get my little bit in somewhere.

I use Codevision and the Codewizard and the library functions save me a great deal of time.

I have not used the full versions of the Imagecraft or IAR AVR compilers (I use the IAR COP8 and it is good) but compared to the PIC compilers I have used, they are far better and with less bugs and support on both is second to none.

Competition is a good thing as we all end up with better products at the end of the day.

Having read this thread all I can say is, thanks Pavel and Richard for both your hard work and without having a real go at each other. You both have great products as you all have your fans as Richard pointed out.

Dave...

admin's test signature
 

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

i agree with dave's statement.

"thanks Pavel and Richard for both your hard work and without having a real go at each other. You both have great products as you all have your fans as Richard pointed out."

my complements to both of you.

admin's test signature
 

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

Thanx!

Pavel

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

I like CodeVision much more as they have good compiling qulity and no such copy protections. The CodeVision also have good supports and friendly answers.

So I like CodeVision than Imagecraft.

I want to puchase the CodeVision but they have no distributers in China. :(

admin's test signature
 

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

Tony,

You dont have to use a distributer in your own country!
I live in the UK and I got mine through DONTRONICS in australia ;- http://www.dontronics.com/

Good luck..

Paul Maddox

BTW, I also agree that both Richard and Pavel have done a great job, and choosing a compiler is a personal choice, as much as choosing a sofa or TV set...

admin's test signature
 

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

I'm a hobbyist so price is an important factor. I like CodeVision for this reason because they provide a low cost Lite edition that supports all AVR's except Mega's.
Good Product, Good Price.

admin's test signature
 

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

I evaluated both the Imagecraft and the CodeVision products. It was a close call - both are great - but in the end I settled for CodeVision. I have never regretted my choice; the user interface, code quality, error reporting and the CodeWizard are excellent.

The support from Pavel has been high quality and FAST. When I started using CodeVision my C coding skills had become somewhat rusty through lack of use ( MS Visual Basic is taking over), Pavel even helped me out with that!!!

-John.

admin's test signature
 

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

I have been playing with CodeVision's delay_us() routine and have noticed that when you start using delays around 1-40 us the delays are not accurate anymore.

when I delay_us(1) I actually get a delay of 1.38us can someone else verify this.

admin's test signature
 

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

I’m not surprised really, if you think about it.

I don’t know about the AVR, but a PIC running at 4MHz will execute an instruction every 1uS. I know the AVRs are faster, but delay_us still has to call a routing and execute some code. So I’m quite impressed that delay_us(1) even came close to 1uS.

Patrick

admin's test signature
 

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

I am NOT trying swaying people one way or another with my timing test.
I am just giving my results of both compilers for you to make up you own mind.

ImageCraft ran the below code @ 102us while CodeVision took 152us.

if I change x an unsigned int, the results change to 178us & 328us likewise.

char x;

while(1)
{
PORTA |=0x01;

for(x=0;x<100;x++)
{}

PORTA &=~0x01;

for(x=0;x<100;x++)
{}
}

admin's test signature
 

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

I agree with Patrick that it is impressive that it can get that close to 1us.
maybe I am being anal about that, but I believe that if I call delay_us(1) I should get a delay of 1us. even though CodeVision is a little off there should be mention of that in the help section.

the more I play with this Atmel the more I see I have been wasting my time with the PIC. :)

admin's test signature
 

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

Hello Jim,

When you do speed benchmarks, make sure to select Optimization for speed
in Project|Configure|C Compiler menu (CodeVisionAVR).

Cheers

Pavel

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

Got that one right jimbo, I'd like to see a PIC even come close to an AVR. I've used PICs for over 10 years, but not any more...........

admin's test signature
 

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

Hi folks,

I just want to point out two things:

1) AVOID special bit I/O instructions. Keep ANSI C instructions, the portability of code
is a BIG issure.

2) The linker is really a plus!! It's a feature, the avrasm lack this feature because is a
poor assembler.

admin's test signature
 

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

I've just bought the Imagecraft compiler and CodeWright. Jim, can you give me some advice on setting up CodeWright for AVR development using Imagecraft C and Assembly, and the STK500?