Author Topic: Cypress USB to I2C bridge DIY using PSOC5?  (Read 7450 times)

0 Members and 1 Guest are viewing this topic.

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
Cypress USB to I2C bridge DIY using PSOC5?
« on: February 10, 2016, 09:14:43 pm »
I'm currently working with a Cypress part that handles my capacitive touch sensing on a project. It doesn't work at the moment so would like to make use of Cypress's interactive program that can be used to fine tune the settings but it requires a USB to I2C bridge for communication. I don't want to spend £100 for Cypress's bridge so I wonder if anyone has hacked one together?

Thanks
Boscoe
 

Offline dferyance

  • Regular Contributor
  • *
  • Posts: 180
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #1 on: February 10, 2016, 10:47:15 pm »
If this is just a one-off, how about getting the http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits for $4.

The USB-to-serial chip can be snapped off and supports I2C.
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #2 on: February 10, 2016, 11:44:53 pm »
Awesome thanks! I've ordered a couple. I'll report back in a couple of days whether it works.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #3 on: February 11, 2016, 12:59:55 am »
Since you are already going that route I did a little example on how to use that break-off part to talk to an I2C RTC from windows using Cypress USB-Serial Software Development Kit that supports Windows, Linux/MAC & Android:

https://www.eevblog.com/forum/microcontrollers/cheap-easy-i2c-dev-kit/msg618200/#msg618200

But so you know the PSoC 5LP prototyping kit might allow you to make a USB-I2C bridge, since the kitprog does implement that functionality, I would have to dig for information on how to do that, but I'm travelling soon and might take a couple of weeks.

But maybe I can find out today.

In any event that link above should help you to use the CY7C65211 chip on that prototyping board with links on what you'll need as well.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #4 on: February 11, 2016, 02:14:03 am »
The kitprog source code available here implements a USB-I2C and USB-UART bridge on a PSoC 5LP
https://www.element14.com/community/thread/27067?start=0&tstart=0

But it is non trivial to take that part out of the kitprog project to make it standalone. So I think the approach to use the PSoC4xxxx prototyping board snap off with the CY7C65211 USB-UART chip is the best way to go.

It not only can do I2C, but SPI and UART as well:


Also I did post other links a couple of posts before that post I linked before
https://www.eevblog.com/forum/microcontrollers/cheap-easy-i2c-dev-kit/msg617096/#msg617096

Hope this helps.
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #5 on: February 11, 2016, 10:44:02 am »
That's amazing information. Thank you very much. As I say I'll report back in a couple of days. My only worry is that the EZ click software for the cap sense configuration will not detect it as a valid I2C bridge because they want you to buy the expensive one.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #6 on: February 11, 2016, 03:15:45 pm »
Make sure you have pull up resistors that match your I2C speed it works fine.
If in doubt look for PSoC I2C examples. on the top schematic usually they add the external components for documentation purposes.

google "100 projects in 100 days elementf14" They have at least one I2C example. Granted is for a PSoC 4 Pioneer kit but it should be portable to the PSoC 5LP.
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #7 on: February 12, 2016, 09:03:32 pm »
Make sure you have pull up resistors that match your I2C speed it works fine.
If in doubt look for PSoC I2C examples. on the top schematic usually they add the external components for documentation purposes.

google "100 projects in 100 days elementf14" They have at least one I2C example. Granted is for a PSoC 4 Pioneer kit but it should be portable to the PSoC 5LP.

I have programmed the bridge with the configuration facility however it doesn't show up as a device in EZ click. Any advice to fool it into thinking it's the right device? Could be as simple as VID PID? Or description?
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #8 on: February 12, 2016, 09:09:01 pm »
Make sure you have pull up resistors that match your I2C speed it works fine.
If in doubt look for PSoC I2C examples. on the top schematic usually they add the external components for documentation purposes.

google "100 projects in 100 days elementf14" They have at least one I2C example. Granted is for a PSoC 4 Pioneer kit but it should be portable to the PSoC 5LP.

I have programmed the bridge with the configuration facility however it doesn't show up as a device in EZ click. Any advice to fool it into thinking it's the right device? Could be as simple as VID PID? Or description?

I never used the EZ click. Can you use the "USB Serial Test Utility" provided by Cypress using the VID and PID that you used in the "Cypress USB-Serial Configuration Utility"?

If you used the defaults, it should be VID 0x04B4 and the PID 0x0004
 

Offline Dielectric

  • Regular Contributor
  • *
  • Posts: 127
  • Country: 00
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #9 on: February 12, 2016, 09:51:46 pm »
I tried it yesterday, but didn't have any luck.  First, EZ-Click won't let you use Cypress' VID with anything other than 0x0004 for the PID, so you'd have to do some weird stuff with the INI files to get it to bind.  Second, on a cursory glance at the API, I don't think the Bridge software uses the same set of commands as the USB driver for the USB-Serial parts use so that's kind of a showstopper.  However, if you grab the $10 PSoC4M kit instead of the older one, you get a full Kitprog on the snap-away part so that would work with EZ-Click:
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit

If you wanted something with an M3 for later, you could grab the equivalent PSoC5LP stick instead:
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-and
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #10 on: February 13, 2016, 07:06:36 am »
I don't know what EZ Click is, but I can say that I have used the CY8CKIT-059 KitProg to tune CapSense on PSoC4 and PSoC5 targets with the CapSense_CSD Tuner in PSoC Creator (Tools->Component Tuners->Name of CSD Component).

I haven't tested if the CY8CKIT-049 works. I have used the USB converter it as an I2C master but not for CapSense tuning with Cypress software.
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2581
  • Country: fr
    • kripton2035 schematics repository
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #11 on: February 13, 2016, 08:10:59 am »
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #12 on: February 17, 2016, 11:58:35 am »
I tried it yesterday, but didn't have any luck.  First, EZ-Click won't let you use Cypress' VID with anything other than 0x0004 for the PID, so you'd have to do some weird stuff with the INI files to get it to bind.  Second, on a cursory glance at the API, I don't think the Bridge software uses the same set of commands as the USB driver for the USB-Serial parts use so that's kind of a showstopper.  However, if you grab the $10 PSoC4M kit instead of the older one, you get a full Kitprog on the snap-away part so that would work with EZ-Click:
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit

If you wanted something with an M3 for later, you could grab the equivalent PSoC5LP stick instead:
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-and

Thanks, this worked for me. It does annoy me Cypress does no mention anywhere this is possible. They only talk about two options, both of which cost over £100 which is ridiculous.
 

Offline Docara

  • Regular Contributor
  • *
  • Posts: 78
  • Country: gb
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #13 on: February 24, 2021, 04:12:59 pm »
Hi Boscoe,

I know this is an old post but I'm in the same position as you were in - what little programmer/debugger worked for you in the end and what if any mods did it need ?

I'm looking to use the ez-click, Capsense and CY8CMBR3116.

Thanks


 
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9005
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #14 on: February 25, 2021, 02:34:48 pm »
Take a look at the MCP2221A if you just want USB to I2C. There's even a Python library for it. https://github.com/nonNoise/PyMCP2221A
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Docara

  • Regular Contributor
  • *
  • Posts: 78
  • Country: gb
Re: Cypress USB to I2C bridge DIY using PSOC5?
« Reply #15 on: February 27, 2021, 04:36:48 pm »
Hi NiHaoMike,

The reason for my post is I intend to use Cypress 'ez-click' software. Cypress wants over £100 for programmer. I don't know if it needs to auto-detect a specific Cypress I2C bridge to operate. I was looking for confirmation that a CY8CKIT-059 (£10) does indeed work with said SW.

Have you used ez-click and the MCP2221A, are your suggesting it from hands-on.

thanks
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf