From 882a1052a66543451731cf54382e6765a376c358 Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Wed, 21 Nov 2012 23:08:22 +0100 Subject: [PATCH] lights.h: PWM_MAX for better measurements The PWM frequency should be different than the ADC frequency (125 kHz) in order to measure in different parts of the PWM cycle (I should have added a low-pass filter to the ADC inputs, but whatever :-) --- firmware/lights.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/lights.h b/firmware/lights.h index 2c1062c..d4efae1 100644 --- a/firmware/lights.h +++ b/firmware/lights.h @@ -28,7 +28,7 @@ void susp_adc(); void timer_start_adcs(); /* pwm.c */ -#define PWM_MAX 0x1FF +#define PWM_MAX 0x1E4 /* This should be different than ADC frequency 125 kHz */ void init_pwm(); void susp_pwm(); -- 2.39.3