#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. |
Definition in file robot.c.
|
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). |
|
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. |