GPIB_AVR
Functions | Variables
timer16.c File Reference
#include "timer16.h"
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <stdlib.h>
#include <stdio.h>
#include "uart.h"

Functions

 ISR (TIMER1_COMPA_vect)
 Interrupt Service Routine - do not call directly This routine is called when the Timer Value TCNT1 reaches the Output Compare Register Value OCR1A.
void timer16_init (void)
 Timer initialisation.

Variables

volatile uint8_t timer
 timer value, increased by interrupt
volatile uint8_t s
 second value, increased by one every second

Function Documentation

ISR ( TIMER1_COMPA_vect  )

Interrupt Service Routine - do not call directly This routine is called when the Timer Value TCNT1 reaches the Output Compare Register Value OCR1A.

References DEBOUNCE, s, and timer.

void timer16_init ( void  )

Timer initialisation.

initializes all registers ands sets second value 's' to zero. Timer is immediately started.

References DEBOUNCE, s, and timer.

Referenced by main().


Variable Documentation

volatile uint8_t s

second value, increased by one every second

Referenced by _gpib_write(), gpib_receive(), ISR(), main(), and timer16_init().

volatile uint8_t timer

timer value, increased by interrupt

Referenced by ISR(), and timer16_init().