Close
0%
0%

USB multi controller

USB to SPI/I2C/PWM/GPIO/ADC as per the users discretion.

Similar projects worth following
This project aims to develop a user side program and the corresponding firmware to enable the user to choose the configuration of an LPC2148 microcontroller. The user will simply have to run the program on a PC and connect (via USB) the programmed LPC2148, set up as a HID device, to get started. The program will offer the user the choice of selecting from a list of available configurations.

LPC2148 board is programmed as an HID device using code from the Keil website.

Set up - IC 74595 has to be set up for SPI communication with the LPC2148. Arduino Uno is connected to demonstrate I2C communication. 3 on board LEDs + 1 external LED are used to demonstrate GPIO. 1 LED is used to show PWM output. The Arduino is flashed with combined I2C Slave receiver and sender code, the received data is displayed via the serial monitor of the Arduino IDE, read data is displayed at the user side.

Pins A4 (SDA) and A5 (SCL) of the Arduino are interfaced with pins 0.3 and 0.2 respectively of LPC2148 board.

I2C_both.ino

Code to demonstrate both I2C read and write functionality, derived from the Slave Writer and Receiver code available on arduino.cc.

ino - 919.00 bytes - 11/27/2018 at 12:57

Download

Register_schem.png

Schematic for interfacing shift register to demonstrate SPI functionality.

Portable Network Graphics (PNG) - 197.50 kB - 11/27/2018 at 12:56

Preview

Arduino_schem.png

Schematic for interfacing Arduino Uno to demonstrate I2C functionality.

Portable Network Graphics (PNG) - 224.58 kB - 11/27/2018 at 12:55

Preview

  • 1 × lpc 2148 Used as the development platform for he project
  • 1 × Arduino Uno Configured and used as an I2C slave.
  • 1 × IC 74HC595 Shift register to check SPI functionality
  • 1 × LEDs To check GPIO and PWM functionality

  • 1
    Pre-Requisites (libusb)

    libusb is a C library that provides generic access to USB devices. The hidapi library uses this to communicate with USB devices connected to the system.

    Click here for libusb documentation

  • 2
    Pre-Requisites (hidapi)

    The user end program uses hidapi library for USB communications. Make sure that the same is installed.

    Click here for library documentation.

  • 3
    Download source code

    The source code for the project is hosted on github here

    To download using git clone, enter the following in a terminal window.

    git clone https://github.com/Scarecrow1006/usb2multi

    Or fork the current repository.  

    You can also download .zip file for the project from the github link.

View all 6 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates