Counter Compare Match Interrupt zur Takterzeugung  Ver.1.0.
kner 2016
Macros | Functions
start.cpp File Reference

Hauptprogramm (Arduino Style) More...

#include <Arduino.h>
#include "_debug.h"

Go to the source code of this file.

Macros

#define F_CPU   1000000UL
 
#define OUTPUT   PORTC0
 

Functions

void setup ()
 
void loop ()
 
 ISR (TIMER2_COMPA_vect)
 

Detailed Description

Hauptprogramm (Arduino Style)

Counter Compare Match Interrupt zur Takterzeugung (ATMEGA 328p 16Mhz)

Author
kner 2016
Date
29.01.16
Version
1.0

Aufgabenstellung

Takt erzeugen mit Output Compare; Periodendauer über PORTB einlesen; Compare Wert berechnen

Anmerkung: laut Aufgabenstellung soll der Takt von Aussen kommen, zu Simulationszwecken wurd auf internen Takt umgeschaltet – der Simulator muss auf 1MHz umgestellt werden.

Definition in file start.cpp.

Function Documentation

ISR ( TIMER2_COMPA_vect  )

just toggles the output pin

Definition at line 57 of file start.cpp.

void loop ( )

reads period in ms from PortB and sets Compare Register

Definition at line 48 of file start.cpp.