Example #1
0
void Initialize_16(const int16_t timerOffset)
{
	//setting the waveform generation mode
	uint8_t wgm = 8;
	
	TCCRA_16(timerOffset) = (TCCRA_16(timerOffset) & B11111100) | (wgm & 3);
	TCCRB_16(timerOffset) = (TCCRB_16(timerOffset) & B11100111) | ((wgm & 12) << 1);
	
	SetFrequency_16(timerOffset, 500);
}
Example #2
0
void Initialize_16()
{
	//setting the waveform generation mode
	uint8_t wgm = 8;
	
	TCCR1A = (TCCR1A & B11111100) | (wgm & 3);
	TCCR1B = (TCCR1B & B11100111) | ((wgm & 12) << 1);
	
	SetFrequency_16(500);
}