PWM zFuass
Ver.1.0.
Lukas H.
|
Hauptprogramm (Arduino Style) More...
#include <Arduino.h>
#include "_debug.h"
Go to the source code of this file.
Macros | |
#define | PD6 6 |
#define | _MAX 0xF |
Functions | |
void | setup () |
void | loop () |
ISR (ADC_vect) | |
ISR (TIMER1_COMPA_vect) | |
ISR (TIMER1_OVF_vect) | |
Hauptprogramm (Arduino Style)
ADC0 steuert die Helligkeit einer LED (OC0A); verwendet wird der Timer1, er wird im fast PWM Mode betrieben und erzeugt dabei sowohl einen Compare Match als auch einen Overflow Interrupt.
ATTENTION: hier sollte besser der Timer0 im FastPWM Mode betrieben werden und dadurch der Pin OC0A automatisch angesteuert werden.
Definition in file start.cpp.