|
TTK4155 Lab Node 1
Term project in the NTNU course TTK4155 Embedded and Industrial Computer Systems Design
|
Functions | |
| int | tim1_PWM_init (void) |
| Initialize Timer1 for Fast PWM on OC1A. | |
| int | tim1_CTC_init (void) |
| Initialize Timer1 in CTC mode on OC1A. | |
| int tim1_CTC_init | ( | void | ) |
#include <timer.h>
Initialize Timer1 in CTC mode on OC1A.
Configures PD5 as output and sets up CTC toggling with a compare value that yields roughly 1–1.2 MHz output depending on clock and prescaler.
Definition at line 26 of file timer.c.
Referenced by main().
| int tim1_PWM_init | ( | void | ) |
#include <timer.h>
Initialize Timer1 for Fast PWM on OC1A.
Configures PD5 as output, sets Fast PWM mode with ICR1 as top, and generates ~50% duty cycle at approximately 983 kHz (with ICR1 = 4).
Definition at line 6 of file timer.c.