SB-Midterm
Dependencies: MMA8451Q8b SLCD mbed
Fork of KL46z_single_tap_2017_blank by
Revision 15:fb9e64c59187, committed 2017-03-13
- Comitter:
- sbart
- Date:
- Mon Mar 13 03:51:30 2017 +0000
- Parent:
- 14:65d6d50062ed
- Commit message:
- -
Changed in this revision
KL46z_single_tap_2017.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 65d6d50062ed -r fb9e64c59187 KL46z_single_tap_2017.cpp --- a/KL46z_single_tap_2017.cpp Mon Mar 13 03:44:13 2017 +0000 +++ b/KL46z_single_tap_2017.cpp Mon Mar 13 03:51:30 2017 +0000 @@ -32,26 +32,26 @@ //SB - sets the pulse register for the Z-axis single tap //line 140 - OR these two numbers to make 11010000 to enable single tap on the Z-axis -//Mainly want to enable bit 4 +//Mainly want to enable bit 4 in register 0x21: PULSE_CFG #define LATCH_DATA 0xC0 #define AXIS_DATA 0x10 //SB - Sets the interrupt for only the Z-axis single tap -//Activate bit 3 with 00000100 +//Activate bit 3 with 00000100 = 0x08 #define SET_INTERRUPT 0x08 //SB - sets the interrupt line for the Z-axis single tap to INT1 -//Activate bit 3 with 00000100 +//Activate bit 3 with 00000100 = 0x08 #define SET_INT_LINE 0x08 //SB - Sets the Z Threshold to 2.016g //The threshold values range from 1 to 127 with steps of 0.063 g/LSB -//00100000 = 32 : 32 * 0.063g = 2.016g +//0x20 = 00100000 = 32 : 32 * 0.063g = 2.016g #define SET_THZ 0x20 //SB - Sets the pulse time limit to 15 ms //At 800Hz, the Normal time step in ms is 0.625 -//00011000 = 24 : 24 * 0.625ms = 15ms +//0x18 = 00011000 = 24 : 24 * 0.625ms = 15ms #define SET_TMLT 0x18 //SB - By default, the data rate is set to 800Hz - Register 0x2A CTRL_REG_1