N50P111 austriamicrosystems, N50P111 Datasheet - Page 11

no-image

N50P111

Manufacturer Part Number
N50P111
Description
SW NAV JOYSTICK MOD CONTACTLESS
Manufacturer
austriamicrosystems
Series
EasyPoint™r
Type
Navigation Switch, PCB Mountr
Datasheet

Specifications of N50P111

Output
Contactless Magnetic Switch
Switch Function
2 Axis with Select
Actuator Type
Joystick
Termination Style
SMD (SMT) Tab
Operating Force
70/180gf
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Contact Rating @ Voltage
-
EasyPoint
Datasheet - U s i n g t h e N 5 0 P 111 M o d u l e
8.3.3 Dead Zone area
The dead zone area is set around the zero position of the module. The zero position is known after the offset calibration. The dead zone area is
a square with a width of 2*center_threshold, around the calibrated zero position.
8.3.4 Interrupt Routine
www.austriamicrosystems.com/N50P111
void Interrupt_Calibrate (center_threshold)
{
}
void EasyPoint_interrupt (void) interrupt 0
{
}
EA = 0; // Disable the MCU interrupts
I2C_Write8(0x40, 0x12, center_threshold - offset_X ); // Xp register
I2C_Write8(0x40, 0x13, -center_threshold - offset_X); // Xn register
I2C_Write8(0x40, 0x14, center_threshold - offset_Y); // Yp register
I2C_Write8(0x40, 0x15, -center_threshold - offset_Y); // Yn register
EA = 1; // Enable the MCU interrupts
int X_temp, Y_temp;
EA=0;// Disable MCU interrupts
/* OPTIONAL: If the module is in a slow power mode (e.g. Wakeup mode
INT_function=1 with 320ms rate), configure to a higher rate with INTn for new
coordinates ready (e.g. INT_function = 0 with 20ms rate) */
x_reg = I2C_Read8(0x40, 0x10); // Read X position
y_reg = I2C_Read8(0x40, 0x11); // Read Y position with interrupt reset
// Add the X and Y offset for correct recentering
X_temp = x_reg + offset_X;
Y_temp = y_reg + offset_Y;
/* OPTIONAL: If X_temp and Y_temp are near the center since a few interrupts,
meaning the knob has been released, the module can be put back in a slow power
mode (e.g. Wakeup mode INT_function=1 with 320ms rate) */
EA = 1; // Enable the MCU interrupts
TM
N50P111
Revision 1.1
11 - 32

Related parts for N50P111