changeset 31:5d6a841eef82

/128 prescaler for adc
author Matt Johnston <matt@ucc.asn.au>
date Thu, 27 Jun 2013 00:12:32 +0800
parents 320c8cc7df5a
children bd9ce7e581ec
files main.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Thu Jun 27 00:12:01 2013 +0800
+++ b/main.c	Thu Jun 27 00:12:32 2013 +0800
@@ -762,8 +762,10 @@
 {
     PRR &= ~_BV(PRADC);
     
-    // /64 prescaler, interrupt
-    ADCSRA = _BV(ADEN) | _BV(ADPS2) | _BV(ADPS1) | _BV(ADIE);
+    // /128 prescaler (86kHz), interrupt
+    ADCSRA = _BV(ADEN) 
+        | _BV(ADPS2) | _BV(ADPS1) | _BV(ADPS0)
+        | _BV(ADIE);
 
     // set to measure 1.1 reference
     ADMUX = admux;