Eli Menchaca Midterm part1

Dependencies:   MMA8451Q8b SLCD mbed

Fork of KL46z_single_tap_2017_blank by Stanley Cohen

Files at this revision

API Documentation at this revision

Comitter:
menchacaeli
Date:
Mon Mar 13 15:02:25 2017 +0000
Parent:
12:10e6d0d12833
Commit message:
Eli Menchaca Midterm Questions part 1

Changed in this revision

KL46z_single_tap_2017.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 10e6d0d12833 -r d165987e5672 KL46z_single_tap_2017.cpp
--- a/KL46z_single_tap_2017.cpp	Thu Mar 09 02:37:39 2017 +0000
+++ b/KL46z_single_tap_2017.cpp	Mon Mar 13 15:02:25 2017 +0000
@@ -29,14 +29,17 @@
 You need to fill nn the missing numbers below for this to work
 0x00 is just a place holder 
 *************************************/
-#define LATCH_DATA        0x00  // for use in REG_PULSE_CFG
-#define AXIS_DATA         0x00
-#define SET_INTERRUPT     0x00     //using interrupt INT1 PTC5
-#define SET_INT_LINE      0x00
+                                   // 0b01000000;
+#define LATCH_DATA        0x40     // sets the pulse for use in REG_PULSE_CFG
+                                   // 0b00010000;
+#define AXIS_DATA         0x10     // sets the data for axis
+#define SET_INTERRUPT     0x08     // sets the interrupt for z-axis on single tap -- INT1 PTC5
+#define SET_INT_LINE      0x08     // sets the line for z-axis single tap
 
-#define SET_THZ           0x00      //  See Table 49 in data sheet
-
-#define SET_TMLT          0x00      // See Table 51 in data sheet
+                                   // 32 = 0x20 = 00100000
+#define SET_THZ           0x20     // sets the threshold See Table 49 in data sheet
+                                   // 24 = 0x18 = 00011000
+#define SET_TMLT          0x18     // sets the time limit See Table 51 in data sheet
 /*********************************************************/
 
 //#define PRINTDBUG