Commit b452c9f5 authored by Petter Breedveld's avatar Petter Breedveld
Browse files

Timer-LF now using OUTTGL instead of XOR

parent 424ddd91
...@@ -24,7 +24,7 @@ int main(void) ...@@ -24,7 +24,7 @@ int main(void)
*/ */
PORTB_DIR |= (1 << LED1) | (1 << LED2); PORTB_DIR |= (1 << LED1) | (1 << LED2);
PORTB_OUT |= (1 << LED1); //Only to start with LEDs off PORTB_OUTTGL |= (1 << LED1); //Only to start with LEDs off
//We will be using a timer overflow interupt with timer A //We will be using a timer overflow interupt with timer A
//We set the prescaler to clk=clk/256 //We set the prescaler to clk=clk/256
...@@ -49,8 +49,7 @@ int main(void) ...@@ -49,8 +49,7 @@ int main(void)
ISR(TCA0_OVF_vect){ ISR(TCA0_OVF_vect){
PORTB_OUT ^= (1 << LED1); PORTB_OUTTGL |= (1 << LED1) | (1 << LED2);
PORTB_OUT ^= (1 << LED2);
TCA0_SINGLE_INTFLAGS |= ( TCA_SINGLE_OVF_bm); //Clear the interupt flag TCA0_SINGLE_INTFLAGS |= ( TCA_SINGLE_OVF_bm); //Clear the interupt flag
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment