The information is referred to the trackpad of blackberry 8520.
First of all, the pinout of the trackpad is this:
(The white triangle indicates the pin 1)Pinout
Note1: signals "sig0, sig1, sig2 and sig3" should be ignored because it is not used in this trackpad)
Note2: The signals with "*", they are connected through a 220K resistor to 2.85V and GND.
Note3: The MOTION signal functions as an interrupt signal is set to 1 when there is data to read and reset to 0 when already read all the data. Data are reading MOTION, delta_x and delta_y records.Schematic
Communication with the trackpad is made using the 4-wire SPI protocol.
The SHTDWN and RESET signals must be at logic 0.
According to my research, the records you need to read are:
Product ID (0x00) - Always returns the value 0x0D. Useful in our application to see if the device is present.
Motion (0x02) - Indicates whether there was a tap on the trackpad. Bit 7 of this register should be inspected, if it is 1 no data to read, if it is 0, no data.
Delta_x (0x03) - Indicates the offset in the x axis.
Delta_y (0x04) - Indicates the offset in the y axis.
Delta_y delta_x and 8-bit registers are signed.
There are many more records .. and as I have observed, are similar to the motion sensor Agilent ADNS-3060. Read the datasheet for more information.
To read the records of the trackpad, we first indicate the direction of the record we want to read and then perform the reading, for example, to read the PRODUCT ID, we should do something like:
spi_write (0x00); / / address PRODUCT ID
data = spi_read(); / / Reads the value of PRODUCT ID
Delta_x and delta_y to read:
spi_write (0x02); / / address delta_x
del_x = spi_read(); / / Value delta_x
spi_write (0x03); / / address delta_y
del_y = spi_read(); / / Value delta_y
I hope you find it useful.