Mouse with PropStick
My way of learning about systems is from the hardward first, which leads inevitably to the software. Current status of the PropStick start-up: It's running smoothly, and almost all of the examples work without problem, including the TV with Graphics_Demo.
Next part of the hardware check out was the mouse. Carefully following the Demo Schematic, I wired the mouse data line to A24 and clock line to A25. However when attempting to run the Graphics_Palette, there was no movement of the mouse cursor. First step was to confirm the mouse worked on another computer. The Parallax mouse actually didn't work on another machine, so I used the PS/2 mouse that was working and tried it on the PropStick. Again, no movement of the cursor in the Palette routine.
Not sure where to go from here. As a simple double check of the Propeller, I was able to confirm A24 and A25 work correctly as inputs and outputs, using Example 7 (ReadingAnInputPort) and Example 1 (Flashing LEDs).
Suggestions on how to debug mouse operation?
Jim C
Next part of the hardware check out was the mouse. Carefully following the Demo Schematic, I wired the mouse data line to A24 and clock line to A25. However when attempting to run the Graphics_Palette, there was no movement of the mouse cursor. First step was to confirm the mouse worked on another computer. The Parallax mouse actually didn't work on another machine, so I used the PS/2 mouse that was working and tried it on the PropStick. Again, no movement of the cursor in the Palette routine.
Not sure where to go from here. As a simple double check of the Propeller, I was able to confirm A24 and A25 work correctly as inputs and outputs, using Example 7 (ReadingAnInputPort) and Example 1 (Flashing LEDs).
Suggestions on how to debug mouse operation?
Jim C
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I was using the drawing for the demo board called "Propeller Demo Board, Rev B". Turns out it is wrong. According to a reference online, the data line and the clock line indicated on the Rev B drawing are switched. Attached is a mirror image of the correct wiring. (Note this drawing is from the perspective of the plug, which is a mirror image of the recepticle)
Changing the wires going to A24 and A25 to correct this error got the mouse going.
I am not surprised by this, the web is full of mirror images of these plugs without the proper notation about 'looking into' or 'looking out of'. At first glance, everyone assumes one or the other without thinking.
I think it is worth mentioning that there are older mice and keyboards with the 5 pin plug [noparse][[/noparse]and larger]. The arrangement is not the same and either one should carefully get good info OR just use an adapter.
'Propeller Demo Board, Rev. C' schematic is available.
But, it still appears to be the mirror image of yours.
I still don't understand what you are saying though. Is this looking 'down into the recepticle's holes' or 'looking into the plug's pins'?
As you can see, it becomes tricky to convey the meaning.
I would offer up the answer, but I can't locate
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Post Edited (Kramer) : 5/11/2006 5:36:12 AM GMT
So, use the 5V pin for orientation. The clock and data lines are on the other side of the circle from the 5V pin with both the plug and the recepticle. BUT, note that on the plug drawing the clock pin is on top-left and the data pin in on bottom-left, and on the recepticle drawing (Rev B/C) it shows the data and clock pin/hole reversed, such that the data pin/hole is on top and the clock pin/hole is on the bottom.
If the wiring to these two pins is mixed up, it doesn't really matter, as it can also be fixed on the mouse driver, Mouse.Spin. The first command there is: PUB start(dpin, cpin) : okay Just switch the values of dpin and cpin.
Eventually, I suppose we'll all have Parallax Propeller Demo Boards, and this business will be all worked out. But while I'm at the breadboard stage, I wind up having to drill all the way down to get things to work. And speaking of the actual Demo board, comparing the picture of the board layout with the schematic, it looks to me like they don't match. Won't be able to tell for sure until there's a wired up one to test, but it looks like on the layout, Pin A24 on the Propeller goes to pin 1 on the PS/2 connector like it's supposed to, and on the schematic, pin A24 goes to pin 5 on the connector.
(Picture of Rev C. Schematic is at http://forums.parallax.com/forums/attach.aspx?a=7248)
(Picture of Demo Board layout: http://forums.parallax.com/forums/default.aspx?f=25&p=1&m=120897)
Don't confuse the backside with the frontside and all will be well.
Obviously to have to reverse the image in your mind to properly solder wires to the backside.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Post Edited (Kramer) : 5/11/2006 4:41:36 PM GMT
The mouse lights up so it is powered.
I have even tried to flip the Data and Clock signals to test a possible mismatch between both.
Anyone has a scope picture to see the shape of the signals CLOCK and DATA ?
I get in both signals a similar shape but inverted.
Pulses are 11ms appart and are 128us wide.
Update: Problem solved. The pull up resistors were not making contact with VDD.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (inaki) : 5/11/2006 7:17:58 PM GMT