ATtiny85 Template Code
Code snippets for the ATtiny85
 All Files Functions Variables Typedefs Enumerations Enumerator Macros
pwm.c File Reference
#include <avr/io.h>
#include "iohelp.h"
Include dependency graph for pwm.c:

Go to the source code of this file.


void pwmInit ()
void pwmOut (PWM pwm, uint8_t value)

Function Documentation

void pwmInit ( )

Initialise the PWM system

Sets up PWM support. The library only supports hardware PWM on TIMER0 so you only get up to two PWM pins - PB0 and PB1.

Definition at line 17 of file pwm.c.

void pwmOut ( PWM  pwm,
uint8_t  value 

Set the value of a PWM pin

Set the output for a PWM pin.

pwmthe PWM output to change
valuethe value for the duty cycle ranging from 0 (fully off) to 255 (fully on).

Definition at line 30 of file pwm.c.