summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/calibration.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-10-09 20:57:51 +0200
committerMichael Buesch <mb@bu3sch.de>2008-10-09 20:57:51 +0200
commit92af9d1735aab816bca994f513314cdcc8b9bd66 (patch)
tree70e346613cb271e78b79167d3993885c0ca5bbef /pressure_control/firmware/calibration.h
parent5522cb6f66bea3b27134f6a4517e8472b7226bda (diff)
downloadcnc-92af9d1735aab816bca994f513314cdcc8b9bd66.tar.xz
cnc-92af9d1735aab816bca994f513314cdcc8b9bd66.zip
Add pressure_control firmware skeleton.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'pressure_control/firmware/calibration.h')
-rw-r--r--pressure_control/firmware/calibration.h18
1 files changed, 18 insertions, 0 deletions
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_ */
bues.ch cgit interface