From 4ce68dd8dd4a012545a5d7f19039840e416ddfc3 Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Tue, 22 Oct 2019 15:44:50 +0300 Subject: baremetal: Add USB HID gamepads example for CY7C68013A chip This example demonstrates how to create the USB HID device on CY7C68013A chip (based on 8051 architecture) using the different toolchains (SDCC, IAR EW, KEIL). Change-Id: I2678c680245c1b969466b2e91fe04850635cc09b Reviewed-by: Richard Weickelt Reviewed-by: Ivan Komissarov Reviewed-by: Christian Kandeler --- .../baremetal/cy7c68013a/nes-gamepads/README.md | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 examples/baremetal/cy7c68013a/nes-gamepads/README.md (limited to 'examples/baremetal/cy7c68013a/nes-gamepads/README.md') diff --git a/examples/baremetal/cy7c68013a/nes-gamepads/README.md b/examples/baremetal/cy7c68013a/nes-gamepads/README.md new file mode 100644 index 000000000..06d1fc77c --- /dev/null +++ b/examples/baremetal/cy7c68013a/nes-gamepads/README.md @@ -0,0 +1,42 @@ +This example demonstrates how to build a bare-metal application using +different 8051 toolchains. It is designed for the target board +based on Cypress FX2 cy7c68013a chip. + +It is possible to use the official development kit from the Cypress: + +* https://www.cypress.com/documentation/development-kitsboards/cy3684-ez-usb-fx2lp-development-kit + +but, a better solution is to buy the China's analogs or replacements, +e.g. on Aliexpress. + +It implements a USB HID device that connects two 8-buttons NES +(Dendy) gamepads to a PC. The gamepads are connected to the +cy7c68013a chip as follows: + +1. CLK - it is an output clock signal which generates by chip from + the port A, pin 0 (PA0). This pin should be connected to the CLK + inputs for both gamepads. + +2. DATA1 - it is an input data signal which comes to chip on the + the port A, pin 2 (PA2). This pin should be connected to the DATA + output from the gamepad #1. + +3. DATA2 - it is an input data signal which comes to chip on the + the port A, pin 4 (PA4). This pin should be connected to the DATA + output from the gamepad #2. + +4. LATCH - it is an output clock signal which generates by chip from + the port A, pin 6 (PA6). This pin should be connected to the LATCH + inputs for both gamepads. + +Actual schematic and pinouts depends on an used gamepads (with 7, 9 +or other pins connectors) and a development boards. + +Also, do not forget to connect the +3.3V and GND wires to the gamepads. +Then it is possible to play 8-bit NES games using various PC simulators. + +The following toolchains are supported: + + * IAR Embedded Workbench + * SDCC + * KEIL C51 -- cgit v1.2.3