Main Page | File List | Globals

robot.c File Reference

The main code for the robot. Mostly the Interrupt-functions. More...

#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
#include <avr/eeprom.h>
#include "robotsound.h"
#include "robotu.h"
#include "robotdo.h"
#include "basic.h"
#include "ir.h"

Go to the source code of this file.

Functions

 SIGNAL (SIG_ADC)
 Here the results of the ADC are evaluated.

 SIGNAL (SIG_OVERFLOW0)
 This function is called by the Timer0 which is the general "tasking" clock of the robot.

int main (void)
 The main program. Does some initialisation and keeps running an eternal loop.


Detailed Description

The main code for the robot. Mostly the Interrupt-functions.

Definition in file robot.c.


Function Documentation

SIGNAL SIG_OVERFLOW0   ) 
 

This function is called by the Timer0 which is the general "tasking" clock of the robot.

There are two modes of the Timer used: the "normal" timing where the prescaler divides the clock by 8 and the "fast" without prescaler. The fast mode is used for the radar and the transmitting and receiving IR-routines. While these are active the normal do_functions are not called. (IR needs a clock of about 36kHz).

Definition at line 56 of file robot.c.

SIGNAL SIG_ADC   ) 
 

Here the results of the ADC are evaluated.

This function is called when the ADC is ready. Which AD-Channel was used and for what use is determined by admodus. The ir_station modus is more complicated as it toggles the IR-LED four times and reinitializes the ADC. The last ADC-value is taken into ir_station_value.

Definition at line 20 of file robot.c.


Generated on Wed Feb 2 20:03:50 2005 for Robot by doxygen 1.3.6