-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathses_pwm.h
34 lines (28 loc) · 986 Bytes
/
ses_pwm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef SES_PWM_H_
#define SES_PWM_H_
/*INCLUDES *******************************************************************/
#include "ses_common.h"
#include "ses_lcd.h"
#include "ses_uart.h"
#include "ses_led.h"
#include "ses_timer.h"
#include "ses_scheduler.h"
/* ***** PWM parameters *****
Frequency: Should be large enough W.R.T to the motor transition
and Within transistor range
Duty cycle: (Ton/ (Ton+Toff))
To set the duty cycle, set the OCR0B to the coresponding '
Inverted mode has been used, (0 is maximum, 255 is minimum)
*/
/* FUNCTION PROTOTYPES *******************************************************/
/**
* Initializes the PWM. Uses hardware timer0 of the AVR.
*/
void pwm_init(void);
/**
* set duty cycle, Compare match value of the timer.
* @param dutyCycle defines the T(on) time to control the V(av)
* on the motor terminals
*/
void pwm_setDutyCycle(uint8_t dutyCycle);
#endif /* PWM_H_ */