bug fix for the power-supply firmware
[digitaldcpower] / dac.c
diff --git a/dac.c b/dac.c
index 6b40674..15ce712 100644 (file)
--- a/dac.c
+++ b/dac.c
@@ -42,9 +42,9 @@ void init_dac(void)
         // See datasheet page 99 (settings) and 88 (description).
         TCCR1A=(0<<COM1A0)|(1<<COM1A1)|(0<<WGM10)|(1<<WGM11);
         TCCR1B=(1<<CS10)|(1<<WGM12)|(1<<WGM13); // full clock speed
-       // 6 bit resolution:
+       // 5 bit resolution:
        ICR1H=0;
-       ICR1L=0x3F;
+       ICR1L=0x1F;
         // At what value to switch on the port (port OC1A=0 -> 0 Volt output)
         OCR1AH=0;
         OCR1AL=0;