|
ADNS9800 + Lens |
x 1 | |
|
PIC18F2XK22 |
x 1 |
Amiga Laser Mouse
DIY Project: Upgrade your Amiga Tank Mouse into a high resolution Laser Mouse.
This project was one of my weekend retro projects done two years ago. At that time, I wanted to upgrade my Amiga Mouse and ended up with this hand made PCB. :)
After sharing the story in a local retro computing forum, people are interested in building their own. So I have modified the design to be manufactured by a factory and ordered a small batch of PCB's.
I am sharing this PCB for those who are interested in building their own. Some basic knowledge on PIC micros and a compiler is also required.
Hardware
The core of the project is an ADNS9800 laser mouse sensor. A PIC micro is used to convert x-y movements into Amiga type A-B quadrature pulses. Resolution of the mouse can be adjusted by placing the CONFIG jumper. When this jumper is in place, resolution can be increased/decreased by using the mouse buttons.
A 3D printed lens holder is used to fix everything to the mouse case. Lens holder 3D design will be shared to public.
BOM:
1 ADNS9800 + Lens
1 PIC18F2XK22
3 3.3K 0805
4 100nf 0805
3 1uF 0805
3 Short M3 screw
2 Micro Switch
2 Pin Header
1 P Ch Mosfet
1 3D Printed Lens Base
Since I don't want the project to be copied and sold without spending any efforts, I will not release the PIC HEX file. But it will very easy to write a simple firmware for this project. Also for those who are interested in building this project, core code sniplets are shown below.
#define HORV1 LATCbits.LATC7=0; TRISCbits.TRISC7=0;
#define HORV0 LATCbits.LATC7=1; TRISCbits.TRISC7=1;
#define HORQ1 LATCbits.LATC6=0; TRISCbits.TRISC6=0;
#define HORQ0 LATCbits.LATC6=1; TRISCbits.TRISC6=1;
#define VERV1 LATCbits.LATC4=0; TRISCbits.TRISC4=0;
#define VERV0 LATCbits.LATC4=1; TRISCbits.TRISC4=1;
#define VERQ1 LATCbits.LATC5=0; TRISCbits.TRISC5=0;
#define VERQ0 LATCbits.LATC5=1; TRISCbits.TRISC5=1;
#define LBTN1 LATBbits.LATB0=0; TRISBbits.TRISB0=0;
#define LBTN0 LATBbits.LATB0=1; TRISBbits.TRISB0=1;
#define RBTN1 LATBbits.LATB1=0; TRISBbits.TRISB1=0;
#define RBTN0 LATBbits.LATB1=1; TRISBbits.TRISB1=1;
void SetPhases(void)
{
if (HorPhase==0) { HORQ0 HORV0 }
else if (HorPhase==1) { HORQ1 HORV0 }
else if (HorPhase==2) { HORQ1 HORV1 }
else if (HorPhase==3) { HORQ0 HORV1 }
if (VerPhase==0) { VERQ0 VERV0 }
else if (VerPhase==1) { VERQ1 VERV0 }
else if (VerPhase==2) { VERQ1 VERV1 }
else if (VerPhase==3) { VERQ0 VERV1 }
}
This is the main loop:
adnsGetDelta(&x,&y);
while (((x!=0) || (y!=0)))
{
if (x>0) { x--; HorPhase--; if (HorPhase>3) HorPhase=3; }
if (x<0) { x++; HorPhase++; if (HorPhase>3) HorPhase=0; }
if (y>0) { y--; VerPhase--; if (VerPhase>3) VerPhase=3; }
if (y<0) { y++; VerPhase++; if (VerPhase>3) VerPhase=0; }
SetPhases();
Delay100TCYx(1); // 100uSec
}
NOTE: You will have to find an ADNS9800 library. ADNS9800 SPI pins are bit-banged, dedicated SPI hardware is not used.
Details of the project can be found below. (Unfortunately in Turkish)
https://www.commodore.gen.tr/forum/index.php?topic=14749.msg182994#msg182994
Amiga Laser Mouse
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(6)
- Likes(23)
- ugur tezer Aug 19,2024
- Engineer May 02,2024
- Panagiotis Katsiris Jan 03,2024
- Ashley Dawson Dec 16,2023
- syuu831 Oct 08,2023
- Tomas Hakl Jul 17,2023
- Özay Turay Jun 22,2023
- Gavin Matthews Jun 19,2023
- David Hansen Mar 21,2023
- Bernd Desens Mar 06,2023
- robertmonaghan Nov 27,2022
- Jaume Anton López Díaz Oct 21,2022
- Steven Piper Oct 06,2022
- Bastelix Jan 23,2021
- Johnny RetroFletch Jan 03,2021
- ngr Oct 26,2020
- Engineer Aug 20,2020
- Engineer Jul 19,2020
- Carsten Lervad Jul 11,2020
- Eddie van Loon May 23,2020
- (DIY) C64iSTANBUL Apr 21,2020
- Csaba Toth Feb 27,2020
- Justin Baldock Nov 06,2019
- 6 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-
10design
-
10usability
-
10creativity
-
10content
-
5design
-
1usability
-
5creativity
-
1content
-
10design
-
1usability
-
10creativity
-
1content
-
10design
-
10usability
-
10creativity
-
10content
-
1design
-
1usability
-
1creativity
-
1content
-
2design
-
1usability
-
7creativity
-
3content
More by eins tronix
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
113 0 0 -
DIY Laser Power Meter with Arduino
162 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
156 0 2 -
-
A DIY Soldering Station Perfect for Learning (Floppy Soldering Station 3.0)
559 0 2