Upload
elyse-firth
View
221
Download
0
Tags:
Embed Size (px)
Citation preview
1. Obtain laser pointer coordinates
2. Send laser pointer coordinates to laptop through the PS/2 port
3. Pixel Mapping between camera image and laptop screen & calibration
4. Attach a button to the laser pointer
Four major components to laser mouse
Overview of Design
• Use Camera Interface
Send Images to FPGA
• LaserSpot module
Analyze each image for
brightest spot
• Use Xbus interface
Send coordinates to Controller
• Use Windows pen drivers
Perform coordinate translation
• Use PS/2 interface
Send coordinates to
laptop
Camera taking constant images
1. Obtain laser pointer coordinates
• How to track the laser point?
• Color mapping to eliminate colors below a brightness threshold
• Upgrades to improve correctness– Multiple bright pixels in one area
Current VGA Display
1. Obtain laser pointer coordinates
LaserSpot – Find the brightest pixel as data is being written to memory.
CrossHairs – As data is being written to the VGA, blank out all pixels except the brightest and draw the crosshairs on the row and column with the brightest pixel.
Normal Camera Interface
2. Send coordinates to the laptop
Controller to laptop through the PS/2 Port
Problems:
• Difficult to find documentation
• Modify driver to use absolute coordinates
Strategy:
• Use Xbus interface to Controller
• Use standard PS/2 protocol
2a. Send coordinates to Controller
Xbus Interface to connect FPGA and Controller
Use Xbus interface designed in class
2b. PS/2 Mouse Port Protocol
8 data bits, least significant bit first.
0 1
Must send 3 consecutive data packets to move mouse• Packet 1 => Mouse click info and movement info
• Packet 2 => new x position (absolute position)
• Packet 3 => new y position (absolute position)
2b. PS/2 Mouse Port Protocol
Composition of each data packet:
• Packet 1 Format: Overflow bits (2), X & Y direction (2), Right & Left mouse click (2), Fixed (2)
• Packet 2 Format: X direction movement
• Packet 3 Format: Y direction movement
Inputs & Outputs of Controller implementation in software:
• Input: FPGA coordinates, Mouse click
• Output: Data to PS/2 port, PS/2 clock (75-150sec)
• External: Pixel Mapping, eliminate laser pointer shaking (both may be able to be implemented in the driver)
3. Pixel mapping
Camera Image of Projection Screen
Laptop screen
256x256 pixels
• 640x480 pixels?
• 800x600 pixels?
• 1024x768 pixels?
Pixel mapping & calibration done in the driver
3. Pixel Mapping
• Calibration– Perform a calibration program before starting to use the laser
pointer as the mouse. Similar to Palm calibration program. The Windows driver is the Unidriver
– Pen Calibration: PENCAL.DLL
• Pixel Mapping– Moving the laser pointer 1 foot on the projection screen means
moving the mouse x pixels in the camera image which is y pixels on the laptop screen. What are x and y?
– Virtual device driver: VPENDC.VXD– Pen driver: PENC.DRV
4. Attach a button
How to connect the button to the Controller?
• Wire
• Radio Frequency
• Camera interface
Laser Pointer Kit
The mouse click will be transmitted in
Packet 1 of the PS/2 Protocol.
Conclusion
1. Laser spot tracking - functional, upgrades pending
2. PS/2 mouse port – this week (week 7), continual upgrades
3. Pixel mapping – weeks 8 & 9, continual upgrades
4. Laser button – week 9 & 10
Any Questions?