- /* Ensure that when the timer is enabled the transmission ISR runs immediately */
- OCR1B = TCNT1 + 1;
-
- /* Start timer 1 with transmission channel force-enabled so that it will immediatly fire */
- TCCR1C = (1 << FOC1B);
- TIMSK1 = (1 << OCIE1B);
- TCCR1B = (1 << CS10);
+ /* Set the transmission and reception timer compare values for the default baud rate */
+ SoftUART_SetBaud(9600);
+
+ /* Setup reception timer compare ISR */
+ TIMSK1 = (1 << OCIE1A);
+
+ /* Setup transmission timer compare ISR and start the timer */
+ TIMSK3 = (1 << OCIE3A);
+ TCCR3B = ((1 << CS30) | (1 << WGM32));