Part | Datasheet |
---|---|
![]() |
KJ-33000-002 (pdf) |
PDF Datasheet Preview |
---|
Joystick I2C Development Kit Programming and Application Note Installed within the Development Kit. Knowles Acoustics 1151 Maplewood Drive Itasca, IL 60143 2011 Knowles Electronics DESCRIPTION AND APPLICATION The is a developer’s kit that includes the installed Joystick. The Joystick is a digital joystick that communicates via an I2C interface. This Application Note describes how to communicate with the Joystick. APPLICATION The Joystick is developed for hand held telecommunication and electronic devices. Refer to manufacturer’s website for current application notes. I2C Interface The I2C controller can operate up to 400kHz fast mode . addressing is implemented. The preprogrammed I2C address is 0x38. If the ADDR line is tied to VDD, the device will respond to address 0x39. A read initiated from the device returns two bytes. The first byte contains a left justified 4 bit value for the X axis while the second byte contains a left justified 4 bit value for the Y axis. The least significant 4 bits of both bytes are zero filled. A write initiated to the device will send it into either Low Power Mode or Sleep Mode depending on the value of the least significant bit. A ‘1’ corresponds to Low Power Mode while a ‘0’ corresponds to Sleep Mode. The open drain interrupt line is asserted low level on a change in either the X or Y value. No interrupts are generated when there are consecutive zeros on both axes. Programming Examples Communication to the Joystick Communicating with the joystick using the I2C bus, simply send the start condition, send the address of the device 0x38 or 0x39 based on the ADDR Pin indicating a read operation. When an Idle condition exists, read a byte from the device X displacement , issue an acknowledgement, then on the next idle, read another byte from the device displacement Finally, issue a wait for an idle condition and issue a stop condition. 2011 Knowles Electronics Sample: IdleI2C ; // Wait for an Idle Condition StartI2C ; // Issue a Start Condition IdleI2C ; // Wait for an Idle Condition address = 0x38 << 1 | 0x01 // Joystick Address Plus Read ack = WriteI2C address // Write the address plus read IdleI2C ; // Wait for an Idle Condition JoystickX = ReadI2C ; // Read Joystick X displacement AckI2C ; // Issue an Acknowledge Condition IdleI2C ; // Wait for an Idle Condition JoystickY = ReadI2C NotAckI2C ; // Read Joystick Y displacement // Issue the Condition IdleI2C ; // Wait for an Idle Condition StopI2C ; // Release the Bus Lookup Tables |
More datasheets: 0985 656 500/1M | 0985 656 500/3M | 0985 656 103/10M | 0985 656 103/5M | 0985 656 103/15M | 0985 656 104/1M | 0985 656 103/3M | 0985 656 103/20M | DDM-50P-P | DCMM37PR |
Notice: we do not provide any warranties that information, datasheets, application notes, circuit diagrams, or software stored on this website are up-to-date or error free. The archived KJ-33000-002 Datasheet file may be downloaded here without warranties.