metal detector software

Dependencies:   mbed

Revision:
0:88f4eeea871a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dac.c	Sat Mar 19 20:35:51 2011 +0000
@@ -0,0 +1,21 @@
+#include "dac.h"
+
+#include "cbn1768.h"
+
+#define DAC_BIAS	0x00010000
+/*----------------------------------------------------------*\
+ | DAC Initial                                              |
+\*----------------------------------------------------------*/
+void dac_init( void ) {
+    /* setup the related pin to DAC output */
+    PINSEL1 |1<<21;  
+    return;
+	}
+
+
+void dac_gonder(int deger)
+{
+
+DACR = (deger << 6) | DAC_BIAS;
+
+}