element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Using CP2130EK, an USB to SPI brigde, in Android (Part1)
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: gihu
  • Date Created: 5 Jan 2015 12:04 PM Date Created
  • Views 1065 views
  • Likes 0 likes
  • Comments 0 comments
  • android
  • ptg
  • cp2130
  • commandtransfer
  • cp2130ek
  • spi
  • usb
Related
Recommended

Using CP2130EK, an USB to SPI brigde, in Android (Part1)

gihu
gihu
5 Jan 2015

This porject is intended to communicate an Android device, through a USB otg cable with a CP2130EK with no specific driver, directly driving the USB connection using its command and bulk tranfer methods in the corresponing end points.

 

Goal:

  • Use an android device as USB host.
  • Communicate with the CP2130, see link USB to SPI Bridge | Silicon Labs
  • Drive GPIOs of the CP2130 (part 1)
  • Drive the ADC Si8902 (part 2, USB to SPI)

 

Motivations:

  • Comms over USB with no driver, just with Android APIs.
  • Use of SPI

 

Sources:

  • Android developer pages, specifically USB Host | Android Developers.
  • Example in blog. Link:Android-er: List attached USB devices in USB Host mode.

 


The APP

The app is created using Android Studio. Minimum requierements are a hardware that support usb otg and software minimum icecream sandwitch 4.0.3.

Android ask for launching the app as soon as the CP2130 is connected to the android device, and detected (recognized by VID and PID).

Once launched, when click the button “Check USB devices”, the app gets a list of the attached and search if the CP2130 is in this list, if so, connects to it.

There are 8 toggle buttons that are used to switch on and off the LEDs connected to the gpio's of the cp2130, to do this we use the commandtranfer functions incuded in the Android APIs see pictures taken from an 7 inch tablet (over ADB connection) and a video of the app running on a mobile phone.

 

Pictures:

 

image

 

image

image

 

Video:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

The evaluation kit

CP2130 Evaluation Kit | Silicon Labs

 

Find here also the .apk file to install the app in an android device. I would also really appriciate if you could test it and give your feedback.

app-release-unsigned-part1.apk

 

If you like this, see also Using CP2130EK, an USB to SPI brigde, in Android (Part2)

 

I really hope you enjoy this post,

Miguel

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube