o Moved calibration output signal to OC2A (PB3) due to issues getting the signal to appear on OC2B.
pull/18/head
DigitalConfections 2020-06-30 14:48:56 -04:00
rodzic 5058ab46f7
commit 8c84dc7a55
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -238,10 +238,13 @@ void doSynchronization(void);
TCCR2B = 0;
TCCR2A |= (1 << WGM21); /* set Clear Timer on Compare Match (CTC) mode with OCR2A setting the top */
#if CAL_SIGNAL_ON_PD3
TCCR2A |= (1 << COM2B0); /* Toggle OC2B (PD3) on compare match */
pinMode(PIN_CAL_OUT,OUTPUT); /* 601Hz Calibration Signal */
TCCR2A |= (1 << COM2A0); /* Toggle OC2A (PB3) on compare match */
#endif /* CAL_SIGNAL_ON_PD3 */
TCCR2B |= (1 << CS22) | (1 << CS21) | (1 << CS20); /* 1024 Prescaler */
OCR2A = 0x0C; /* set frequency to ~300 Hz (0x0c) */
OCR2B = 0x00;
/* Use system clock for Timer/Counter2 */
ASSR &= ~(1 << AS2);
/* Reset Timer/Counter2 Interrupt Mask Register */

Wyświetl plik

@ -70,7 +70,7 @@
/******************************************************
* Set the text that gets displayed to the user */
#define SW_REVISION "0.14"
#define SW_REVISION "0.15"
//#define TRANQUILIZE_WATCHDOG
@ -105,6 +105,7 @@ typedef unsigned char uint8_t;
#define PIN_DIP_1 5
#define PIN_DIP_2 6
#define PIN_AUDIO_OUT 9
#define PIN_CAL_OUT 11
typedef enum {
BEACON = 0,