1
0
mirror of https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter synced 2024-12-21 23:18:56 -05:00
Arduino-USB-HID-RetroJoysti.../C64_1351_Mouse
2017-08-10 19:31:53 +03:00
..
c64_usb_mouse-debug.ino Rename c64_usb_mouse.ino to c64_usb_mouse-debug.ino 2017-08-09 00:55:14 +03:00
c64_usb_mouse.ino Update c64_usb_mouse.ino 2017-08-09 00:59:27 +03:00
README.md Update README.md 2017-08-10 19:31:53 +03:00

USB mouse -> 1351 (C64) mouse adapter

Requirements

  • Arduino Pro Micro 16MHz 5V (or Arduino Uno 16MHz 5V)
  • USB Host Shield (USB Host Shield Library 2.0 from Arduino IDE Library Manager)
  • 2pcs 10k resistors
  • Level shifter for 6 pins

Pin 9 and 10 needed for TIMER1 - Move SS and INT of USB host shield library away

C:\Users\xxxxx\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0\UsbCore.h:

//typedef MAX3421e<P10, P9> MAX3421E; // default pin asignments
//Arduino Pro Micro SS=A0(P18), INT=A1(P19):
typedef MAX3421e<P18, P19> MAX3421E;
//Arduino Uno SS=A0(P14), INT=A1(P15):
//typedef MAX3421e<P14, P15> MAX3421E;

Joystick port -> Arduino

  • 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) (2 down (green), 3 (paddle 1 btn) (left) grey -> 7, 4 (paddle 2 btn) (right) purple -> 8)

USB Host Shield (3.3V) -> Arduino

  • 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!)
  • RST -> RST (3.3V!) (Pro Micro: beware of GND in place of RST!)
  • GND -> GND
  • VCC -> 3.3V
  • VBUS -> 5V (cut trace from VBUS-pad to resistor!)

!: MOSI, MISO and CLK pins are wrongly marked in USB Host Shield DuinoFun UHS mini v2 -module!

Hardware

I used Arduino Pro Micro and module which have AMS1117 3.3V regulator and 8 bidirectional voltage converters.

Arduino

Arduino Pro Micro

USB Host Shield

USB Host Shield DuinoFun UHS mini v2

Level converter with regulator

Level converter with AMS1117