rename U8 amplify option and comment out by default
This commit is contained in:
parent
bfa80a629e
commit
fe6734dcba
@ -50,7 +50,7 @@
|
|||||||
//#define ADC_PRESCALE_32 /* Up to ~27kHz. */
|
//#define ADC_PRESCALE_32 /* Up to ~27kHz. */
|
||||||
#define ADC_PRESCALE_64 /* Up to ~18kHz. */
|
#define ADC_PRESCALE_64 /* Up to ~18kHz. */
|
||||||
|
|
||||||
#define U8_EXTRA_PRECISION /* (U8 sampling mode only) use 9th ADC reading bit and chop off 1st bit for more precision (sacrificing half of the bandwidth) */
|
//#define U8_AMPLIFY_X2 /* (U8 sampling mode only) amplify audio by factor 2. */
|
||||||
|
|
||||||
#define RECORDING_DELAY_IN_MINUTES 0 /* Wait n minutes before starting to record. */
|
#define RECORDING_DELAY_IN_MINUTES 0 /* Wait n minutes before starting to record. */
|
||||||
#define ADC_CHANNEL AdcChannel0
|
#define ADC_CHANNEL AdcChannel0
|
||||||
@ -197,7 +197,7 @@ ISR(TIMER1_COMPA_vect) {
|
|||||||
ISR(TIMER1_COMPB_vect) {
|
ISR(TIMER1_COMPB_vect) {
|
||||||
// Retrieve ADC Value and Write to Buffer
|
// Retrieve ADC Value and Write to Buffer
|
||||||
#if defined(SAMPLE_MODE_U8)
|
#if defined(SAMPLE_MODE_U8)
|
||||||
#ifdef U8_EXTRA_PRECISION
|
#ifdef U8_AMPLIFY_X2
|
||||||
uint8_t l = ADCL; /* Read ADC registers. (Order matters!) */
|
uint8_t l = ADCL; /* Read ADC registers. (Order matters!) */
|
||||||
uint8_t h = ADCH;
|
uint8_t h = ADCH;
|
||||||
uint8_t adcval = (h << 7) | (l >> 1);
|
uint8_t adcval = (h << 7) | (l >> 1);
|
||||||
@ -323,7 +323,7 @@ void setup() {
|
|||||||
#endif
|
#endif
|
||||||
ADCSRB = _BV(ADTS2) | _BV(ADTS0); /* Auto-trigger source select: "Timer/Counter1 Compare Match B". */
|
ADCSRB = _BV(ADTS2) | _BV(ADTS0); /* Auto-trigger source select: "Timer/Counter1 Compare Match B". */
|
||||||
ADMUX = _BV(REFS0) /* Use AREF pin (VCC by default) as reference voltage. */
|
ADMUX = _BV(REFS0) /* Use AREF pin (VCC by default) as reference voltage. */
|
||||||
#if defined(SAMPLE_MODE_U8) && !defined(U8_EXTRA_PRECISION)
|
#if defined(SAMPLE_MODE_U8) && !defined(U8_AMPLIFY_X2)
|
||||||
| _BV(ADLAR) /* Left adjust ADC output so we only need to read ADCH. */
|
| _BV(ADLAR) /* Left adjust ADC output so we only need to read ADCH. */
|
||||||
#endif
|
#endif
|
||||||
| (0xF & ADC_CHANNEL); /* Select our ADC input channel. */
|
| (0xF & ADC_CHANNEL); /* Select our ADC input channel. */
|
||||||
|
Loading…
Reference in New Issue
Block a user