This link has been bookmarked by 5 people . It was first bookmarked on 28 May 2007, by isawika.
-
16 Jun 07
-
All Cricket devices have a built-in bidirectional infrared communications channel, which is used for Cricket-to-desktop communication (when downloading programs to a Cricket, or viewing sensor data) and Cricket-to-Cricket communication.
-
Cricket Logo is based on an iterative, interactive model of project development. It includes a “command center” window; instructions typed into this window are instantaneously compiled, downloaded to a Cricket, and executed, giving the system the flavor of an interpreted software environment such as
LISP,BASIC, orFORTH. -
The MetaCricket software system is based on a virtual machine, written in
PICassembly language and running on the Cricket, and a compiler for the virtual machine running on a desktop development computer -
It is straightforward to implement an interpreter-like interface, where user commands are transparently compiled, downloaded, and executed.
-
The Cricket virtual machine is burned into the
PICmicroprocessor's internalROM -
The user's code resides in a serial
EEPROM -
Built-in infrared communications routines include a protocol for reading and writing to this external
EEPROM, and for asking the virtual machine to begin execution of byte codes already loaded into theEEPROM. -
User-level primitive functions compile to one, two, or three bytes of object code for the Cricket virtual machine.
-
The Cricket virtual machine has two process threads: a foreground process and a background daemon. In most Cricket programs, the foreground thread handles all the work, but for some tasks, the background daemon is valuable. For example, the background daemon can be used to instigate a periodic activity, or take action when some event occurs.
-
There are hardware-specific primitives for interacting with on-board Cricket hardware. Motor commands set state (on or off), direction, and power levels for each of the two integrated motor drivers. Analog sensor primitives (
sensoraandsensorb) return a value (0 to 255) for each of the two voltage inputs. These inputs also may be interpreted as digital values using theswitchaandswitchbprimitives. There is a pair of primitive functions for generating tones on the piezo beeper:beepandnote, the latter taking pitch and duration arguments. -
there is a background millisecond timer that is updated every four milliseconds
-
One foreground thread plus one background daemon Daemon fires when provided Boolean expression makes false-to-true transition -
Users write programs for the Cricket in Cricket Logo, a dialect of Logo specialized for the Cricket virtual machine. Essentially, there is a one-to-one mapping between statements in Cricket Logo and primitive functions built into the virtual machine. This makes the implementation of the compiler far simpler than typical compilers.
-
The compiler includes an interactive mode—a text window where user expressions are compiled, downloaded, and executed in one step when the user presses the return key. A portion of the Cricket's memory is set aside for these dynamic programs.
-
we have found that a debugger is not necessary because of the interactive and incremental style of project development that occurs when using the Cricket.
-
- Check that a Cricket is present and ready for other commands.
- Write a byte to the Cricket's
EEPROM. - Read a byte from the Cricket's memory.
- Begin program execution from a particular memory address.
The infrared protocol includes the following capabilities:
-
-
28 May 07
-
31 Jan 05
David CorkingFantastic. The Cricket research paper from MIT c. 2000. Lots of projects that they built with their Cricket bus-connected microcontrollers. The Cricket contains a bytecode interpreter for a compiled subset of Logo.
Functional programming Robots-hobby and consumer Computers in Education
-
music became a central feature of Cricket projects, and researchers around our laboratory chose to use Crickets simply because it let them use the MidiBoat device. Not only did the use of the MidiBoat extend far beyond the intentions of its designers, but it also fostered the growth of the MetaCricket approach throughout our lab.
-
-
11 Oct 01
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.