RGB LED cube 5x5x5  1.0
Martin Stejskal, Schmidt Dominik
 All Files Functions Variables Macros Groups Pages
Macros | Functions
pwm_rgb.h File Reference

Driver for PWM on ATmega64 for controlling "R_GND", "G_GND" and "B_GND". More...

#include <avr/io.h>
#include "bit_operations.h"
#include "settings.h"

Go to the source code of this file.

Macros

#define pwm_set_r(value_8bit)   OCR3A = value_8bit;
 Set PWM value for red LED's. More...
 
#define pwm_set_g(value_8bit)   OCR3B = value_8bit;
 Set PWM value for green LED's. More...
 
#define pwm_set_b(value_8bit)   OCR3C = value_8bit;
 Set PWM value for blue LED's. More...
 

Functions

void init_pwm_rgb (void)
 Prepare HW PWM channels. More...
 

Detailed Description

Driver for PWM on ATmega64 for controlling "R_GND", "G_GND" and "B_GND".

For advanced effects is PWM nice feature

Definition in file pwm_rgb.h.

Macro Definition Documentation

#define pwm_set_b (   value_8bit)    OCR3C = value_8bit;

Set PWM value for blue LED's.

Just paste value to OCR3C register -> set PWM for blue LED's

Definition at line 47 of file pwm_rgb.h.

#define pwm_set_g (   value_8bit)    OCR3B = value_8bit;

Set PWM value for green LED's.

Just paste value to OCR3B register -> set PWM for green LED's

Definition at line 39 of file pwm_rgb.h.

#define pwm_set_r (   value_8bit)    OCR3A = value_8bit;

Set PWM value for red LED's.

Just paste value to OCR3A register -> set PWM for red LED's

Definition at line 31 of file pwm_rgb.h.

Function Documentation

void init_pwm_rgb ( void  )

Prepare HW PWM channels.

If pwm_support is set to "disabled", then pins are only set to "1" forever

Definition at line 13 of file pwm_rgb.c.