ohohnick Posted August 4, 2014 Report Share Posted August 4, 2014 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. Link to comment Share on other sites More sharing options...
alvieboy Posted August 5, 2014 Report Share Posted August 5, 2014 You will need to at least use the cyc/stb and ack signals. What's the tick for ? Does it signal valid data ? Alvie Link to comment Share on other sites More sharing options...
ohohnick Posted August 6, 2014 Author Report Share Posted August 6, 2014 Thanks for your reply Alvie. btnm, xm, ym and tick are signals to control LEDs, when users move the PS2 mouse, the LEDs will light and react with different orders Link to comment Share on other sites More sharing options...
alvieboy Posted August 6, 2014 Report Share Posted August 6, 2014 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 More sharing options...
ohohnick Posted August 22, 2014 Author Report Share Posted August 22, 2014 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.