09-30-2015 01:54 PM
Hello friends.
I'am trying to connect only the optical sensor from optical mouse to myRIO.
The optical sensor is A1610. Datasheet to similar A2610: http://media.digikey.com/pdf/Data%20Sheets/Avago%20PDFs/ADNS-2610.pdf
According to the pinout, to transfer data I must connect SCK (clock), SDIO (data), VDD, GND. I connected SDIO and SCK into DIO of myRIO. VDD to +5V and GND to GND.
The communication needs a clock signal at a length of 250ns per pulse.
It is possible to write to and read from the sensor via data line. A read operation consist of 2 Byte. The first Byte has '0' at MSB (that indicates that we are reading data) and seven bit request data from certain register. Register 0x42 is for X-movement and register 0x43 is for Y-movement. After sending the request is 100us delay and after that sensor will give a Byte containing a movement information of Y or X.
A write operation consist of 2 Byte. The first Byte contains 7-bit address and '1' as MSB. The second Byte contains data that you want to write. (You can configure various parameters).
I want to read movement data X and Y several times per second from the sensor and use it in other application in myRIO. Can you tell me an advice how can I communicate with this sensor via myRIO? It is possible? Thank you.
10-01-2015 04:19 PM
Hi Paul,
Thanks for the information. According to the data sheet to have a good data readings from this sensor you need that the SCK be of 2 MHz max (f_clk/12>> f_clk = 24 mHZ). Since this signal is provided by myRIO's DIO you need to be sure that your device (I do not know which one is) can handle this frequency in its DIO.
For example, if you have a myRIO 1900 the minimum pulse with is 20 ns, this means that the period of the signal is 40 ns so the max freq. that this device can handle is 25 MHz.
It would be nice to confirm this with your device (I do not know what kind of myRIO you have) but I would say that your myRIO will handle the optical sensor's requirements.
Regards
10-02-2015 10:50 AM - last edited on 01-26-2024 01:50 PM by migration-bot
Thanks for the answer.
I'm using myRIO-1900 device: https://www.ni.com/en-us/shop/model/myrio-1900.html
And how can I generate 2MHz square wave to digital output? PWM is only for 40Hz to 40kHz. I assume that square wave.vi and express square wave generator are for analog output. Maybe I can use somehow a 40MHz onboard clock, but I dont know how.
10-02-2015 02:37 PM - last edited on 01-26-2024 01:50 PM by migration-bot