Sample Source Code for the MAVRIC / MAVRIC-II Mega128 Board

The following sample source modules are provided for your convenience to help you get started using your MAVRIC-IB or MAVRIC-IIB board quickly. Some code examples are provided in the C language using the GNU GCC C Compiler, while others are provided in BASCOM-AVR Basic Compiler.

If you wish to donate a code example for inclusion here, please contact us.

Hello World! - Your First AVR-GCC C Program

Here's the BASCOM-AVR equivalent for those using BASIC.
xram - stub routine for setting up external memory

Simple stub routine demonstrating how to initialize and make use of external memory.
ROBIN - ROBot Independent Network

ROBIN is a packet protocol designed for use with small microcontrollers and is applicable to many applications including robotics, distributed sensing and control networks, home control, laboratory or industrial automation, etc.
RX50 - dual rx50 h-bridge w/quadrature encoder input

Sample program demonstrating how to drive a pair of RX50 h-bridges and decode a pair of quadrature encoders for motor position feedback.
Fundamentals of R/C Servo Control

Demonstrates how to control 6 R/C servos with high precision and low processor overhead.
I2C Bus Scanning Tool

This is a simple tool to probe for and report devices on the I2C bus.
Magnevation SpeakJet Voice Synthesizer

Simple demonstration of how to drive the SpeakJet using a MAVRIC-IIB.
Magnevation SpeakJet Voice Synthesizer

Complete interactive program for exploring the SpeakJet chip.
Simple AVR Threads Implemenation
Using the Devantech SRF08 Ultrasonic Ranger Module with MAVRIC / MAVRIC-II
Using the Devantech CMPS03 Compass Module with MAVRIC / MAVRIC-II
Using the Devantech SP03 Speach Module with MAVRIC / MAVRIC-II
Reading SHARP GP2D12 IR Sensors in C
Several BASCOM-AVR Examples
Simple example using the ICCAVR C Compiler