2017-08-10 20:33:56 +03:00
## USB mouse -> 1351 (C64) mouse adapter (+paddles)
2017-06-01 17:09:08 +03:00
2017-08-07 11:21:48 +03:00
#### Requirements
2017-08-07 11:20:38 +03:00
2017-08-07 11:36:09 +03:00
- Arduino Pro Micro 16MHz 5V (or Arduino Uno 16MHz 5V)
2017-08-07 11:23:24 +03:00
- USB Host Shield (USB Host Shield Library 2.0 from Arduino IDE Library Manager)
2017-08-07 11:23:06 +03:00
- 2pcs 10k resistors
- Level shifter for 6 pins
2017-08-07 11:20:38 +03:00
2017-06-01 17:21:59 +03:00
#### Pin 9 and 10 needed for TIMER1 - Move SS and INT of USB host shield library away
2017-06-01 17:00:10 +03:00
2017-05-30 19:31:59 +03:00
C:\Users\xxxxx\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0\UsbCore.h:
2017-06-01 17:00:10 +03:00
```
2017-08-07 11:35:45 +03:00
//typedef MAX3421e< P10 , P9 > MAX3421E; // default pin asignments
2017-06-01 17:21:27 +03:00
//Arduino Pro Micro SS=A0(P18), INT=A1(P19):
2017-05-30 19:31:59 +03:00
typedef MAX3421e< P18 , P19 > MAX3421E;
2017-08-07 11:35:45 +03:00
//Arduino Uno SS=A0(P14), INT=A1(P15):
//typedef MAX3421e< P14 , P15 > MAX3421E;
2017-05-30 19:32:52 +03:00
```
2017-06-01 17:00:10 +03:00
#### Joystick port -> Arduino
2017-08-10 18:42:06 +03:00
- 9 (POTX) -> 10k resistor -> 9 (OC1A) (brown)
- 9 (POTX) -> Arduino Pro Micro: 4, Arduino Uno: 8 (ICP1) (white)
- 5 (POTY) -> 10k resistor -> 10 (OC1B) (orange)
- 6 (FIRE, left mouse button) -> 5 (yellow)
- 1 (UP, right mouse button) -> 6 (blue)
- 8 GND -> GND (black)
- 7 5V -> 5V (red)
2017-08-10 19:55:32 +03:00
##### +Paddles:
- 3 (LEFT) (Paddle 1 fire) -> 7 (grey)
- 4 (RIGHT) (Paddle 2 fire) -> 8 (purple)
2017-08-10 19:56:02 +03:00
(unconnected: 2 DOWN (green))
2017-06-01 17:00:10 +03:00
2017-06-01 17:02:56 +03:00
#### USB Host Shield (3.3V) -> Arduino
2017-08-07 11:35:45 +03:00
- SS -> A0 (Arduino Pro Micro), A0 (Arduino Uno) (check UsbCore.h) (3.3V!)
- INT -> A1 (Arduino Pro Micro), A1 (Arduino Uno) (check UsbCore.h) (3.3V!)
- MOSI -> 16 (Arduino Pro Micro), 11 (Arduino Uno) (3.3V!)
- MISO -> 14 (Arduino Pro Micro), 12 (Arduino Uno) (3.3V!)
- CLK -> 15 (Arduino Pro Micro), 13 (Arduino Uno) (3.3V!)
2017-06-16 18:35:02 +03:00
- RST -> RST (3.3V!) (Pro Micro: beware of GND in place of RST!)
2017-06-01 17:00:10 +03:00
- GND -> GND
- VCC -> 3.3V
- VBUS -> 5V (cut trace from VBUS-pad to resistor!)
2017-06-16 18:35:02 +03:00
2017-06-01 17:24:57 +03:00
!: MOSI, MISO and CLK pins are wrongly marked in USB Host Shield DuinoFun UHS mini v2 -module!
2017-06-01 17:00:10 +03:00
2017-06-01 17:03:22 +03:00
#### Links
- http://asdasd.rpg.fi/~svo/%5bm%5douse/
2017-06-05 19:24:09 +03:00
- http://www.zimmers.net/anonftp/pub/cbm/documents/projects/interfaces/mouse/Mouse.html
2017-06-05 20:40:16 +03:00
- https://www.google.com/patents/US4886941
2017-06-01 17:03:22 +03:00
- https://ist.uwaterloo.ca/~schepers/MJK/pics/joyports.gif
2017-06-01 17:06:44 +03:00
- Trace cut from USB Host Shield mini: https://geekhack.org/index.php?topic=80421.0
2017-06-01 20:22:47 +03:00
- https://gammon.com.au/interrupts
- http://www.avrbeginners.net/architecture/timers/timers.html
2017-08-07 11:27:07 +03:00
- https://github.com/felis/USB_Host_Shield_2.0/blob/master/avrpins.h
2017-08-07 17:42:06 +03:00
- https://github.com/felis/USB_Host_Shield_2.0/blob/master/UsbCore.h
2017-06-01 17:00:10 +03:00
2017-06-01 17:23:48 +03:00
### Hardware
2017-06-01 17:02:56 +03:00
I used Arduino Pro Micro and module which have AMS1117 3.3V regulator and 8 bidirectional voltage converters.
2017-06-01 17:09:41 +03:00
2017-06-01 17:20:07 +03:00
#### Arduino
2017-06-01 17:09:41 +03:00

2017-06-01 17:20:07 +03:00
#### USB Host Shield
2017-06-01 17:09:41 +03:00

2017-06-01 17:20:07 +03:00
#### Level converter with regulator
2017-06-01 17:09:41 +03:00
