Reading a PS/2 mouse

I have some source codes that should be able to read a mouse through the PS/2 port on the Xilinx fpga board; it sends $F4 to the mouse and then wait for data from the mouse. However, I probed the ps/2 port of the mouse and found that the mouse is not sending signals (clk & data), both signals constantly stay at around 4V (Vcc = 5V). (I attach the mouse to the PC & probe the same port, and there are signals responding.) What would be the possiblities of such failure?

Reply to
greenplanet
Loading thread data ...

Seems like there is problem initializing the mouse. The host pulls the clk down to start initializing; however, the mouse clock doesn't start after the host releases the clk.

Reply to
greenplanet

Just a few quick questions -

  • What FPGA? It is 5V compatible?
  • Are you driving the line to 'Z' (tri-state), or to a '1'?

The fact that the line is about 4V smells bad - could you have contention?

Jeremy

Reply to
Jeremy Stringer

Thanks for your reply, Jeremy!

I was using Xilinx Spartan 2E 200 on Digilent D2Sb with DIO4 extension board. I'm driving the line to 'Z' not to '1'. However, after probing the PS/2 port (6 pin mini-DIN)on the board without attaching a mouse, I found that the data and clk stay at '0' always (according to the schematic from Digilent, there is no pull up circuit on both PS/2 data and clk lines). When I probe the corresponding fpga pins, they work as I programmed (logic 1 = 3.3V, logic 0 ~0V). Seems like the fpga couldn't take control of the port!

I will try to use another board (XESS XSA3S1000 with Xstend V3.0) and see if this happens.

Reply to
greenplanet

A stupid question but... If you are using a daughterboard and are onl reading 0V, are you sure that

- The daughterboard is correctly connecte

- You use the proper IO pins on FPG

Reply to
Big Boy

Yes I did, those are the only IO pins that I can use and it is correctly connected.

Reply to
greenplanet

np.

!? Sounds a touch odd. If the pins are connected to the PS/2 port, then you would expect the port and the pins to be the same. If you take the PS/2 port as the reference, then it would perhaps be a case of enabling the pullup resistors in the IOB (xc_pullup attribute for synplify - the xilinx attribute is PULLUP (from memory))). This wouldn't explain your original problem though.

Guess you need to find out why the pins and the port don't match :) The other point of course, is that you state that the protocol uses 5V - but you're driving 3.3V?

Jeremy

Reply to
Jeremy Stringer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.