Giuseppe's HomeSite |
||||||||||||||
|
|
|
||||||||||||
|
|
Welcome to my AVR Page! Here you can find infos on my projects with Atmel AVR micro.
AVR is a microcontroller made by Atmel . It is very powerful, much more than PIC. Its power is due to the fact that its architecture makes easy programming in assembly and allows designers to adopt high level languages in developing complex applications. In fact there is a port of the GNU C/C++ compiler which works with a freeware assembler: AVA. I use these development tools for my projects. You can find them at: Directory of /pub/avr-gcc . There is also a Windows port at Atmel for Dummies. Why do I think AVR is better than PIC?AVR has 32 8 bit registers, the last 6 of which can be used as 3 16 bit registers, much more memory and a flexible stacks that allows preemptive multitasking and the use of high level languages such as C++. While some things are true for PIC now with the new models (18 series) some others not (the register architecture for example). Microchip has developed a free C compiler for the new models, so I doubt there will ever be a GCC port to PIC and I love too much C++ for leaving it. Some people say PICs have much better electrical characteristics and they are more robust and I agree, but my solution is simple: first adopt every trick to make AVR works and only then consider using PIC. In this way I think I will never have to use PIC.... My AVR works:In August 1999 I wrote an RTOS (realtime operating system) for AVR. I called it GAOS (Giuseppe AVR OS). It took me one month to do it because I had to fight not only with the bugs of my OS but also with bugs of AVA. One in particular was very annoying to me: you can not have segment switch inside a macro definition. For that reason I had to develop a small macro expander that I call prea (which stands for preprocessor for assembler). It is not a preprocessor and it is quite stupid as macro expander, but it did what I needed to develop my RTOS. PREA Although prea executables are freeware the sources are NOT. They are provided only to allow compiling on architectures to which I have no access. Also note that I am not responsible for any damage caused by my programs. If you agree download prea.tgz (150k, includes sources and binaries for Linux i386 and Windows) GAOS It is a simple realtime OS: it has a scheduler and delay functions. User programs are normal tasks or coded-priority(cp) tasks (a kind of virtual interrupt). The scheduler is executed every 1024 cycles: it executes all the ready cp-tasks and preempts the current normal task for the next ready. More in detail: CPTASKS are functions that the scheduler executes every cycle. If there is time the scheduler executes all CPTASKS and then normal tasks (without priority for now), else it starts form the beginning and so low priority CPTASKS miss the call, but high priority ones do not. For now, however, all CPTASKS are executed and so I call them virtual interrupt.... I'm sorry but GAOS is not finished yet: for now there is only an assembly interface and the priority system is not fully implemented.
Last modified: Sat Jul 20 20:08:32 2002 Copyright 2000 Giuseppe Dal Cero | ||||||||||||