element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Using CP2130EK, an USB to SPI brigde, in Android (Part2)
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: gihu
  • Date Created: 8 Jan 2015 7:36 PM Date Created
  • Views 521 views
  • Likes 3 likes
  • Comments 3 comments
  • android
  • bulktransfer
  • cp2130
  • silabs
  • spi
  • usb
  • otg
Related
Recommended

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

gihu
gihu
8 Jan 2015

In this part 2, the code of the app is based on the same idea, but this time using android API bulktranfer methods just to use the SPI in the CP2130.

 

The APP

Like the first app, it is created using Android Studio. Minimum requierements are a hardware that support usb otg and software minimum icecream sandwitch 4.0.3.

Again, android ask for launching the app as soon as the CP2130 is connected to the android device, and detected. This time, when the app starts, it makes the usb connection directly with the CP2130.

There is one button to start/stop the SPI communications with the ADC Si9702. The app reads two channels of the ADC, CH0 for the potentiometer, and CH1 for the MCP9701 temperature sensor.

For the potentiometer there is a progress bar that shows from 0% to 100% the position of the wiper. And for the MCP9701 there is a TextView showing the temperature in celsius degrees in format XX.XºC.


Communications (bulktranfer transactions), as recommended, run in a diferent thread in order not to block the user interface.

See the pictures and video.


image

image

image

 

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

Also if you want to checkit, here is the .apk file to instal it:

app-release-unsigned-part2.apk

 

I would really appreciate if you try it and give your feedback.

 

I hope you really enjoy this post,

 

Miguel

  • Sign in to reply

Top Comments

  • adampax
    adampax over 5 years ago +1
    @gihu Thanks for posting this! Any chance you could share your source code for part 1 and part 2?
  • freedom
    freedom over 3 years ago

    @gihu: is it possible to share your source code (CP2130 driver)? Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • gihu
    gihu over 5 years ago in reply to adampax

    Sorry Adam, I did not check e14 messages until now image.

    I'll check it

     

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • adampax
    adampax over 5 years ago

    @gihu Thanks for posting this! Any chance you could share your source code for part 1 and part 2?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
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 © 2023 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