o Unused pins are set to inputs pulled high.
pull/18/head^2
DigitalConfections 2020-06-30 15:54:32 -04:00
rodzic 8c84dc7a55
commit f442284fd9
2 zmienionych plików z 31 dodań i 21 usunięć

Wyświetl plik

@ -193,20 +193,25 @@ void doSynchronization(void);
pinMode(PIN_AUDIO_OUT, OUTPUT);
digitalWrite(PIN_AUDIO_OUT, OFF);
#if !HARDWARE_EXTERNAL_DIP_PULLUPS_INSTALLED
pinMode(PIN_SYNC, INPUT_PULLUP); /* Sync button */
pinMode(PIN_DIP_0, INPUT_PULLUP); /* DIP switch LSB */
pinMode(PIN_DIP_1, INPUT_PULLUP); /* DIP switch middle bit */
pinMode(PIN_DIP_2, INPUT_PULLUP); /* DIP switch MSB */
#else
pinMode(PIN_SYNC, INPUT); /* Sync button */
pinMode(PIN_DIP_0, INPUT); /* DIP switch LSB */
pinMode(PIN_DIP_1, INPUT); /* DIP switch middle bit */
pinMode(PIN_DIP_2, INPUT); /* DIP switch MSB */
#endif /* HARDWARE_EXTERNAL_DIP_PULLUPS_INSTALLED */
digitalWrite(PIN_LED, OFF); /* Turn off led sync switch is now open */
/* Set unused pins as outputs pulled high */
pinMode(PIN_UNUSED_7, INPUT_PULLUP);
pinMode(PIN_UNUSED_8, INPUT_PULLUP);
pinMode(PIN_UNUSED_10, INPUT_PULLUP);
pinMode(PIN_UNUSED_12, INPUT_PULLUP);
pinMode(A0, INPUT_PULLUP);
pinMode(A1, INPUT_PULLUP);
pinMode(A2, INPUT_PULLUP);
pinMode(A3, INPUT_PULLUP);
#if !CAL_SIGNAL_ON_PD3
pinMode(PIN_CAL_OUT, INPUT_PULLUP);
#endif
/* set timer1 interrupt at 1Hz */
TCCR1A = 0; /* set entire TCCR1A register to 0 */
TCCR1B = 0; /* same for TCCR1B */

Wyświetl plik

@ -70,7 +70,7 @@
/******************************************************
* Set the text that gets displayed to the user */
#define SW_REVISION "0.15"
#define SW_REVISION "0.16"
//#define TRANQUILIZE_WATCHDOG
@ -98,14 +98,19 @@ typedef unsigned char uint8_t;
#define null 0
#endif
#define PIN_LED 13
#define PIN_MORSE_KEY 2
#define PIN_SYNC 3
#define PIN_DIP_0 4
#define PIN_DIP_1 5
#define PIN_DIP_2 6
#define PIN_UNUSED_7 7
#define PIN_UNUSED_8 8
#define PIN_AUDIO_OUT 9
#define PIN_UNUSED_10 10
#define PIN_CAL_OUT 11
#define PIN_UNUSED_12 12
#define PIN_LED 13
typedef enum {
BEACON = 0,