01-22-2008 05:37 PM
01-23-2008 03:38 PM
Hi andrikos
First off I would like to thank you for using our discussion forms.
The 37-PIN 6221 doesn’t have a Vcc, and you can’t use the analog output set to 5V to act as the Vcc, because the mouse specifications you sent tell me that the mouse may draw upto 275mA, and the NI 6221 cannot source this kind of current. The analog output is only capable of driving 5mA of current.
If you can find a way to power the mouse then reading the output signals of the mouse is relatively easy. Basically you would set up a continuous digital channel acquisition with external timing, and use the mouse’s clock as the clock for the digital input. If you are using LabVIEW, then the Cont Read Dig Chan-Ext Clk.vi is well suited for this application.
You can read in the data line on Port0/Line0 (pin 37) or Port0/Line1 (pin 19), as the 6221 only has two clocked digital inputs. You will also have to attach the clock from the mouse to any of the PFI lines (in your case PFI1) and ensure that you specific the clock for the digital input task as PFI1.
This will enable you to read in the raw data from the mouse, and it will allow you to parse the data into 11 or 12-bit chunks, and use the protocol described in your PS2 mouse document to give practical meaning to the data you obtain.
Please note that currently you will not be able to accomplish this because you have no way to provide the Vcc to the mouse with the DAQ card that you are using.
Have a great day
Chris_K
01-23-2008 05:05 PM
01-24-2008 07:19 AM
01-24-2008 10:03 AM
01-24-2008 05:34 PM
The power option sounds like it should work. Have you been able to successfully read a packet of bits from the Mouse while you are powering it?
As for the clock, I was under the impression that you were going to use the clock from the mouse to time the input received. Is this correct? I am unsure what you mean when you say that you disconnect the clock and data. Can you explain exactly what you want to use as the clock, either the mouse’s or are you specifying your own.
Communication to the mouse is possible, but it might be difficult if you require feedback from the mouse for transmission. If you just need to transmit bits to the mouse then it is just specific a clock, and send your data to the mouse using a digital write task. If you need to set up some sort of handshaking, then you will have to develop your application to deal with it and there will be many things to consider which may be possible but it could be very difficult to account for everything. Also note that the card you are using only has 2 clocked DIO lines.
For the clock you can use a counter and set the high times and low times independently. You can set it the low time to be 100 μs and use it as a clock for your application.
Chris_K
01-24-2008 06:54 PM
01-27-2008 03:32 PM
Have a look at the Gen Dig Pulse Train-Continuous-Pause Trigger.vi example in the LabVIEW example finder. You can use a pulse train as your clock, and with some proper timing you might be able to get the proper clock pull-down. The other option is to create a digital waveform and create a custom waveform that includes the 100uS low time. You can then use the other timed DIO line on your card to send it to the mouse.
Chris_K
02-28-2008 04:23 AM
Hi all
Am new to Labview. Am using LV8.2 evaluation version.
My current project is to communicate with PS2 mouse via USB signals or even with Parallel port. My application is to give a control from LV8.2 that the device gets powered/unpowered with the click of a button.
I don't have any DAQ. Is it possible to control the mouse(Power/unpower) via system USB or parallel port + LV8.2 ?
Earlier reply was much appreciated.
Thanks & Regards
Mathan
02-28-2008 08:20 AM