From 92af9d1735aab816bca994f513314cdcc8b9bd66 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Thu, 9 Oct 2008 20:57:51 +0200 Subject: Add pressure_control firmware skeleton. Signed-off-by: Michael Buesch --- pressure_control/firmware/calibration.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pressure_control/firmware/calibration.h (limited to 'pressure_control/firmware/calibration.h') diff --git a/pressure_control/firmware/calibration.h b/pressure_control/firmware/calibration.h new file mode 100644 index 0000000..eb2f532 --- /dev/null +++ b/pressure_control/firmware/calibration.h @@ -0,0 +1,18 @@ +#ifndef CALIBRATION_H_ +#define CALIBRATION_H_ + +/**************************************************************************** + * Microcontroller CPU speed calibration * + ****************************************************************************/ + +/* CPU frequency in HZ */ +#define CPU_HZ 16000000 +/* 1ms timer calibration */ +#define DELAY_1MS_TIMERFREQ (1 << CS01) /* == CPU_FREQ/8 */ +#define DELAY_1MS_LOOP 80 +#define DELAY_1MS_LOOP_TIMES 25 +/* 1us delayloop calibration */ +#define DELAY_1US_LOOP 4 + + +#endif /* CALIBRATION_H_ */ -- cgit v1.2.3