At a glance
The oneChip compiler enables
you to rapidly and simply develop single chip solutions for a
variety of circuits. It is a basic language compiler targeted
at the powerful AVR series of RISC microcontrollers from Atmel.
This microcontroller features excellent performance, a low price,
and has the advantage of being flash memory based for a rapid
write, burn, test development cycle without the added expense
and hassle associated with windowed devices.
The oneChip compiler allows
beginning users to benefit from the ability to write in a high
level language that insulates them from the details of the processor.
Traditional control structures such as true IF..THEN..ELSE statements
can be nested and mixed with loops and other control structures
without having to worry about the details involved. More complex
tasks such as RS232 style communications are handled simply with
Intermediate users benefit
from the high level features the language offers and have the
ability to mix in assembly language routines as if they were basic
language commands. Variable dimensioning is allowed to specific
registers and a large number of predefined constants and register
names are supported to simplify the task.
Advanced users have the
flexibility of adding statements to the language. The language
is fully and simply extensible. This feature goes beyond simple
macro style commands. Full type checking of passed and returned
parameters is supported along with the ability to include common
subroutines called from within the added routine. An integral
librarian is present to guard against redundant code generation.
The compiler features an
integral programmer driver for "one stop" program compilation
and burning. It supports the Atmel development and evaluation
programmer (serial version) as well as other compatible programmers.
The compiler can also generate a standard hex file for users that
want to protect their investment in their current programming
The oneChip compiler is
an externally extensible compiler that supports a variety of the
Basic language targeted for embedded microcontrollers. The compiler
supports a large variety of commands as well as 8 and 16 bit data
types. Support is currently offered for the AVR series of RISC
processors from Atmel. This processor family is currently composed
of devices ranging from a 20 pins with 15 I/O lines to a 40 pins
with 32 I/O lines. Flash (program memory) as large as 8K bytes
(4K instructions) with 512 bytes of EEPROM, 512 bytes of RAM and
32 working registers are available. Peripheral features include
watchdog timers, analog comparators, A/D converters, PWM outputs,
and external interrupts. An onboard oscillator is available for
circuit configurations requiring a minimum of external components.
The devices support up to a 16 Mhz clock with most instructions
taking one clock cycle to execute yielding a throughput approaching
1 MIPS per MHz. These throughput specifications apply to the assembly
language execution speed. Compiled Basic program's execution speed
will vary based on the instructions compiled. The efficiency of
the compiled code is typically very good.
The oneChip compiler is
designed to be useful for users with a variety of skill levels.
For users that are new to microcontrollers, the language requires
a minimum amount of knowledge to be useful. It is possible to
write useful, full featured programs with very little knowledge
about the specific processor being used. The dialect of Basic
supported will feel familiar to individuals who have written Basic
programs in the past. As a learning aid, the compiler is capable
of producing a commented assembly language listing of the program
being compiled. Comment lines from the users program are maintained
and the assembly language the compiler uses to represent the users
program is fully commented. Syntax or logical errors found while
the program is being compiled are reported in plain english making
program debugging straightforward.
Users with experience working
with embedded microcontrollers enjoy the benefit of working in
a higher level language while maintaining the ability to use assembly
language directly where deemed necessary. Assembly language can
be mixed directly with Basic commands using the same variable
and constant names used in the Basic program. To lend the degree
of control necessary to accomplish this, variables can be declared
to specific registers in the processor when desired. To assist
in program debugging, user added assembly is noted as such if
an assembly language listing is generated.
For users with advanced
needs the language itself can be extended through the use of an
external file. The external file contains the name of the function
or procedure being added, its type, the number and type of the
arguments accepted, the restrictions (if any) on the registers
used, and the assembly language that composes the routine being
added. When the Basic program is compiled, the compiler consults
the external file for these added functions. The compiler will
generate an error if the number, type, or locations of the passed
and returned parameters do not match the way in which the function
or procedure is called. It is possible to have the added function
call for a library routine to be added to the compiled code. The
library function itself can take passed arguments from the externally
added function. An integral librarian guards against the addition
of redundant library routines. The compiler parses all entries
in the external file allowing functions to be overloaded (one
function name can accept different numbers and types of arguments).
This extensibility carries through to compilers integral assembler
which itself is scriptable.
In addition to all Atmel assembly language statements the OneChip compiler