Insert a PS2 mouse into ZPUino


ohohnick

Recommended Posts

Hi there!

 

I'm doing a project about insert a PS2 mouse created by Verilog into the ZPUino. I have run into some problems.

 

1. the PS2 mouse has two inputs: clock, reset, two inouts: ps2d, ps2c which are connected to the actual mouse, and four outputs: xm, ym, btnm, tick which connects to the wb_dat_o. I'm not sure what other wishbone signals I need to use in this module.

 

2. After connecting the mouse with wishbone, I need to insert it with ZPUino. And I don't know where to start.

 

post-37218-0-89835100-1407243676.jpg

post-37218-0-37093600-1407243685_thumb.j

Link to comment
Share on other sites

That information is not helpful, unless you actually tell me the meaning of each of the signals.

 

In order to connect the mouse to the CPU, you need to provide a means to put the information into temporal context. I assume that Xm and Ym are "difference" values, not absolute, so you will have to position the mouse in the controller, or you will have to interrupt the CPU every time the mouse moves, so it can compute that.

 

For difference values, you need to know exactly when the mouse sent you new data. I assume "tick" is for just that, tell me if I am wrong.

 

So you have to choose between a full interrupt-driven approach, a simple polling approach, or a mix of both. Only then you can implement the wishbone interface.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Alvie

 

Thx for your reply. Sorry I was busy with other parts of my project these days.

 

I know more about the mouse module now.

 

The PS2 mouse has the signals as x-axis(right/left) and y-axis(up/down) movement and the click statue of left, right and middle button.

So the signals xm and ym are two 9-bit x-axis and y-axis movement signals and btm is a 3 bit button status signal. m_done_tick is a one-clock-cycle statue and is asserted when the assembled data is available.

 

ps2d and ps2c are signals connecting with the mouse's transmitting and receiving system.

 

I have checked all the VHDL files in the papilio_pro_lx9_vanilla_ise ZPUino. I think I can use one "empty device" such as "slot8" to implement the mouse. But I'm not sure what other files do I need to modify also.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.