Author Topic: PSoC examples  (Read 50211 times)

0 Members and 1 Guest are viewing this topic.

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: PSoC examples
« Reply #25 on: May 11, 2013, 01:34:09 pm »
These Cypress PSoc chips sound awesome.  Which one would you recommend for a hobbyist? 

That is, one that comes in a hobbyist-friendly package.  0.65mm pin pitch package or bigger, for example.

And free (as in beer), unencumbered development software.  I don't want to have to pay to use the vendor's hardware or do yearly re-licensing nonsense.

After some research I think I have determined the answer to my question is: PSoC 4.  These are Cortex M0-based and (soon to be) available in TQFP and SSOP packages.

It looks like they haven't hit the streets just yet, though. 

It looks like they are going to be very nicely priced.  I'll have to check them out when they are available.
The more I look, the more features I discover. The built in switching power supply that can convert 0.5V to 3.6V input voltage to 1.7V to 5V. Fantastic! So you can make a circuit that can run of a single NiMh AAA cell. I assume you can also use the output voltage to power the rest of the circuit as well.

Definitely, the PSoC 4 is very interesting. The bottom end of the range does not have the programmable logic, so it will be the mid-range ICs that I will have to try out.
 

Online kripton2035

  • Super Contributor
  • ***
  • Posts: 2572
  • Country: fr
    • kripton2035 schematics repository
Re: PSoC examples
« Reply #26 on: May 11, 2013, 02:00:33 pm »
to discover the psoc4 you have the pioneer kit @ $25 ...
http://www.cypress.com/?rID=77780
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: PSoC examples
« Reply #27 on: May 11, 2013, 02:17:58 pm »
to discover the psoc4 you have the pioneer kit @ $25 ...
http://www.cypress.com/?rID=77780

Interesting.  Looks like they're directly targeting the hobbyist market with that kit.  I'll have to pick one up next time I place an order for components.
 

Offline Spikee

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: nl
Re: PSoC examples
« Reply #28 on: May 11, 2013, 09:08:15 pm »
I just bought the last pioneer kit from Mouser  :P .
I will make a video when it arrives in a few days to evaluate it.
The system on chips seems awesome and the M0 serie is also pretty cheap compared to the normal 8 bit atmel chips.
Freelance electronics design service, Small batch assembly, Firmware / WEB / APP development. In Shenzhen China
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: PSoC examples
« Reply #29 on: May 21, 2013, 07:13:29 pm »
Is anyone selling the PSoC Pioneer kit with free shipping?  (In the US)
 

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: PSoC examples
« Reply #30 on: May 22, 2013, 12:00:41 am »
For those in Oz, element14 now has the pioneer in stock (they didn't when this thread started.) $31.50 + GST. 

The CY8C4245AXI-483 looks like the only psoc 4 device they've got so far in stock (but it's still an interesting device.)

I'll have to grab a board next order I have with them.
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: PSoC examples
« Reply #31 on: May 22, 2013, 12:13:43 am »
There's not much information, but this looks interesting: PSoC5LP POPULTD DEVELOP BOARD
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: PSoC examples
« Reply #32 on: May 22, 2013, 12:41:53 am »
Two years ago there was a contest with some interesting ideas:

http://www.cypress.com/?id=3312

The winner project was a mixed analog-digital scope:

http://www.cypress.com/?id=3312&conID=235

I was at least one of the 100 people who made it into the contest with my idea and I got a free developer kit and free engineering samples of the chip for my own PCB. I was in the final contest phase with this project:

http://www.frank-buss.de/MultiLogger/index.html

Still work in progress, when I have some more spare time, but it can already measure multiple analog voltages and temperature, save it on SD card, transfer to a PC and with capacitive touch buttons, all controlled from the PSoC chip. The interesting part was the voltage divider for the analog inputs for different ranges, which I've done with the analog building blocks of the PSoC and which required just some external resistors, all the rest was in the PSoC. But the integrated OpAmps are not the best.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: PSoC examples
« Reply #33 on: May 22, 2013, 01:03:21 am »
FrankBuss,

Springs for CapSense? Wow, that's neat! How would you fix the layout issues?

Also, what didn't you like about the internal op amps? Too much offset error?
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: PSoC examples
« Reply #34 on: May 22, 2013, 07:00:15 am »
Springs for CapSense? Wow, that's neat! How would you fix the layout issues?
Thanks, but not my idea, described in this nice Cypress app note: http://www.cypress.com/?rID=48787
I don't know how to fix the layout problem, I'm more a digital guy, maybe I just replace it with normal buttons. Was interesting to try cap sense, and looks like magic if you touch just the case, but after all I think I prefer normal buttons.

Quote
Also, what didn't you like about the internal op amps? Too much offset error?
Yes. First I tried an internal PGA for amplifying the input voltage, but at high gain it was not precise enough. I was able to modify it with two of the analog muxes and external resistor networks, which worked well.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline jmole

  • Regular Contributor
  • *
  • Posts: 211
  • Country: us
    • My Portfolio
Re: PSoC examples
« Reply #35 on: May 24, 2013, 06:19:34 am »
Wanted to chime in RE: PSoC 4.

One thing you all should know is that the PSoC 4 has pretty limited resources compared to PSoC 3/5.

For example, with PSoC 4, you only get 4 digital blocks compared to 24 in PSoC 5. Compare the datasheets before you buy. There are tons of differences.
 

Offline mkissin

  • Regular Contributor
  • *
  • Posts: 117
Re: PSoC examples
« Reply #36 on: May 25, 2013, 02:15:48 am »
One thing you all should know is that the PSoC 4 has pretty limited resources compared to PSoC 3/5.

I'm hoping that's because they have only released the two cheapest variants (the 4100 series has no UDBs!). There are two more variants which are listed as "coming soon" which will hopefully have more blocks in them. I'll be very disappointed if they top out at 4 blocks.
 

Offline fuffkin

  • Contributor
  • Posts: 10
  • Country: gb
    • Spell Foundry
Re: PSoC examples
« Reply #37 on: May 25, 2013, 01:21:57 pm »
I've been using PSoC's for many years and have used them in several products. The ones I've used are PSoC 1's and where they really score is the integration of the analogue devices - which when the PSoC 1 came out (around 13 years ago) was totally unique, eg DAC's, op-amps, comparators. You can also form things like multi-stage low-pass and high-pass filters, so you can have a DAC which then feeds into filtering, that you can change the characteristics of dynamically, all on the chip.

For real-world applications I've used PSoc's in sound generators and oodles of high-power LED drivers - you can integrate programmable constant current generators and also generate supply voltages etc. I've often used them as companion chips to PIC's that control them over I2C. You in effect, make your own custom ASIC with them.

I think the PSoC 4 is a very impressive family of devices (I never really "got" the PSoC 3 or 5). They are low cost, low power and low pin count. Next time I feel the need to reach for a PSoC, it'll be the PSoC 4 from now on. :)



 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: PSoC examples
« Reply #38 on: September 06, 2014, 10:31:30 pm »
I'm resurrecting this thread, since I recently started to play with my dormant PSoC kits.

So I hooked it up and got the sample code straight from the IDE and got it all set in no more than a couple of minutes.

I did change the Constant Current to 7 bit mode since it seems more accurate than the 8 bit one but I'll give that one a try later.


Here are the results:
Code: [Select]
Constant current mode. 7 bits 0-152.4 uA range 1.2 uA increments.
000 000.00 +- 0.00uA
001 001.17 +- 0.02uA
002 002.42 +- 0.02uA
003 003.65 +- 0.02uA
004 004.91 +- 0.02uA
005 006.13 +- 0.02uA
006 007.36 +- 0.02uA
007 008.57 +- 0.02uA
008 009.80 +- 0.02uA
009 011.00 +- 0.02uA
010 012.22 +- 0.02uA
020 024.55 +- 0.02uA
030 036.73 +- 0.02uA
040 048.75 +- 0.01uA
050 060.83 +- 0.01uA
060 072.94 +- 0.01uA
070 085.13 +- 0.01uA
080 097.32 +- 0.01uA
090 109.46 +- 0.01uA
099 120.42 +- 0.01uA <- pictured
100 121.62 +- 0.01uA
110 133.87 +- 0.01uA
120 145.93 +- 0.01uA
127 154.47 +- 0.01uA but this one drifts

So it's pretty accurate and linear other than it's 1.2163 uA increments and it seems more stable in the upper range.

It does have constant voltage mode too, but I'll play next with the 8 bit constant current to compare it to these results.

Picture when set at 0x63 (99) It was supposed to be 100 but that was giving me 121.62uA


« Last Edit: September 06, 2014, 10:41:01 pm by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: PSoC examples
« Reply #39 on: September 06, 2014, 11:23:19 pm »
As suspected is a bit more jumpy and where I put 0.01uA is probably 0.015uA because some times I hit places that it doubles the error.

So In 8 bits the increments are smaller than they are supposed to be
1.1726uA instead of 1.2uA


Also in 8 bits it seems less linear.

Code: [Select]
Constant current mode.
8 bits 0-306 uA range 1.2 uA increments
000 000.00 +- 0.00uA
001 001.06 +- 0.02uA
002 002.23 +- 0.02uA
003 003.39 +- 0.02uA
004 004.65 +- 0.02uA
005 005.80 +- 0.02uA
006 006.98 +- 0.02uA
007 008.14 +- 0.02uA
008 009.29 +- 0.02uA
009 010.45 +- 0.02uA
010 011.62 +- 0.02uA
020 023.35 +- 0.02uA
030 035.06 +- 0.02uA
040 046.87 +- 0.01uA
050 058.56 +- 0.01uA
060 070.28 +- 0.01uA
070 082.06 +- 0.01uA
080 093.81 +- 0.01uA
090 105.53 +- 0.02uA
099 116.15 +- 0.01uA
100 117.26 +- 0.02uA
110 129.06 +- 0.01uA
120 140.67 +- 0.01uA
127 148.93 +- 0.01uA
130 152.38 +- 0.01uA
140 164.18 +- 0.01uA
150 175.79 +- 0.02uA
160 187.58 +- 0.01uA
170 199.22 +- 0.01uA
180 210.7            <- DMM Range changed.
190 222.5
200 234.3
210 245.9
220 257.8
230 269.5
240 281.1
250 292.8
255 298.8


Edit: In the 0-612uA range at 2.4 steps it's stepping  at around 2.30 and 2.34
single data point using 255 give me 597uA output instead of 612uA
« Last Edit: September 06, 2014, 11:34:27 pm by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: PSoC examples
« Reply #40 on: September 06, 2014, 11:43:33 pm »
Also I want to note that I'm using the Pioneer as a full programmer debugger as I posted here:

https://www.eevblog.com/forum/microcontrollers/help!-what-mcu-(greater-than-8-bits-of-smarts)-is-easiest-to-graduate-to/msg507751/#msg507751

$25 programmer/debugger/devkit and $4 breadboardable prototype kit :)

Edit: fixed link

Next Constant Voltage :)
But since the VDAC8 is only available for the PSoC 3 and 5LP then I will have to use this:

http://www.element14.com/community/thread/27064/l/idac-conversion-to-vdac-enabling-two-idacs

BTW for anyone that wants to use C++ instead of C here is a link:
http://mbedded.ninja/programming/microcontrollers/psoc/using-cplusplus-with-psoc-creator

« Last Edit: September 07, 2014, 12:25:07 am by miguelvp »
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: PSoC examples
« Reply #41 on: September 07, 2014, 01:57:31 am »
I think both IDACs on PSoC4 are quite "synched", that is, they "drink" from the exact same ... reference or whatever (can't explain this). I did the triangle wave generator below, analog ramps, all hw with only 1 external capacitor, using 1 switched IDAC that sinks at twice the rate that the other sources. No changing offset, so I assume both IDACs source/sink exactly the same current...



This circuit can easilly do 1MHz triangle wave, although with some offset and at a low Vpp of 0.48V; check the wave at WaveOut and TClk @ 1MHz (the IDAC comutation point can be seen).



I did this as an introduction design on PSoCs. Before this design I started with another one that used a little more hw and needed the CPU intervention to switch the wave growing direction. This limited the upper frequency at 245KHz, having the CPU on almost 100% usage. After thinking some more about this I reached this all-hw solution. I think a lot of juice can be extracted from this hw.

I find it odd that in this thread there was just a small mention of how the PSCoC Creator IDE is good. Damn, it is good, you guys have to try it. And, to my interpretation of the license, there isn't any kind of fee or limitation attached, you can even use it to develop commercial products. PSoC 4 is currently and by far my ARM of choice (the prototyping kit is damn cheap too).
« Last Edit: September 07, 2014, 02:10:24 pm by nuno »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: PSoC examples
« Reply #42 on: September 07, 2014, 03:40:52 am »
Nice, I think I'll try that, thanks!

I'm still going through their samples from the IDE, so how about a voltmeter?
The sample also converts the analog die temperature to digital.
Voltage is using their internal 1.024V reference.



The standing board has two pots, one I'm using for the display contrast, the other for the voltage dial.


For the constant voltage I need to solder the other male headers because the opamps are on the other side, and that means redoing the jump wires as well (simple since they just need to be moved to the other side and move the display more to the left, maybe tomorrow.
« Last Edit: September 07, 2014, 03:43:57 am by miguelvp »
 

Online kripton2035

  • Super Contributor
  • ***
  • Posts: 2572
  • Country: fr
    • kripton2035 schematics repository
Re: PSoC examples
« Reply #43 on: September 07, 2014, 12:15:10 pm »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PSoC examples
« Reply #44 on: September 07, 2014, 01:20:40 pm »
Quote
whats so special about them?

They are unlike your typical mcus in a few important regards:

1) user programmable parts: those are essentially mcu + cpld (analog+digital). They are highly user configurable. Your imagination is really the limitation as to what they can do - the number of such blocks is limiting on those parts, however;
2) programming interface: rather than writing code, the programming interface is mostly a drag-and-drop. I happen to think that's the future of the mcu programming - Cypress is light years ahead of its competitors (ST/Micro/Atmel/NXP, maybe on par with Freescale), and even Keil / IAR in terms of providing an excellent graphical programming interface.
3) very flexible remappable pins: this is one step ahead of PIC24's remappable pins - which I considered the best implementation.

However, it has some severe limitations:

1) the reliance on vendor toolchains: the primary programming interface is PSoC Creator. It doesn't support programmers like jlink. You can export the designs to Keil / IAR (which do support jlink) but Keil / IAR doesn't support the graphical interface. So if you use jlink, you have to go back-and-forth between PSoC Creator + Keil/IAR.

2) it is very difficult to code those things natively in Keil / IAR: there is no device header file provided through Keil / IAR. The only way for you to code is to create your own header file, or create a generic PSoC Creator project with all the features and export it to Keil / IAR.

3) limited user base;

4) limited number of user configurable blocks in the 4100/4200 devices. If they had 6 or 12 such blocks, it would have been superb.

It is a very promising product. Hopefully Cypress will continue to enhance it. But I wouldn't jump in right now. I think they are  a generation or two away from going big / mainstream.
================================
https://dannyelectronics.wordpress.com/
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: PSoC examples
« Reply #45 on: September 07, 2014, 03:54:40 pm »
[...]
However, it has some severe limitations:

1) the reliance on vendor toolchains: the primary programming interface is PSoC Creator. It doesn't support programmers like jlink. You can export the designs to Keil / IAR (which do support jlink) but Keil / IAR doesn't support the graphical interface. So if you use jlink, you have to go back-and-forth between PSoC Creator + Keil/IAR.
Just to add some color...

PSoC Creator ships with a GCC 4.7.3 toolchain. There's nothing really special about it. When you press the "Generate Application" button in Creator, it produces all the code necessary to configure the chip and run your application. At that point, you can compile it with any toolchain.

Since most of my development happens on a mac (and I'm alergic to IDEs), I run PSoC Creator in parallels and point it at a directory that's shared with OS X. Compiling, flashing and debugging all happen from OS X. Using the segger is a real win here because it's about the only jtag/swd probe other than Cypress' that knows how to flash the PSoC chips.

The code generated by Creator is generally very nice. If Cypress' API works for you, then it's very easy to get stuff done. However, if you need to go around their generated code and talk to the hardware directly, it's a big step up in complexity and there's not a lot of documentation (other than reverse engineering the generated code).
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7311
  • Country: nl
  • Current job: ATEX product design
Re: PSoC examples
« Reply #46 on: September 07, 2014, 04:05:12 pm »
4) limited number of user configurable blocks in the 4100/4200 devices. If they had 6 or 12 such blocks, it would have been superb.
This, and I don't get what is so superb about them. The Psoc3 has a slow 20 bit ADC, but it is cheaper to just use an external, the Psoc4 has up to 32 macrocells. So I can make a 32 bit counter in it  :-// Or I can make PWM with it, which is already there in preatty much anything. The 8 bit DAC and 12 bit ADC is not enough for any application I'm looking for, ADCs and DACs start at 16 bit.
And we have 2 communication interfaces, which you can set to anything... except any ARM will have all 4 of it for the same price.
The only exceptional thing I see here is the 5V and the pin remapping. If there would be some real decent hardware built in, maybe, but it looks like to me that they just didnt add enough precision and size for anything useful.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: PSoC examples
« Reply #47 on: September 07, 2014, 04:28:39 pm »
However, if you need to go around their generated code and talk to the hardware directly, it's a big step up in complexity and there's not a lot of documentation (other than reverse engineering the generated code).
I did this once:
http://www.frank-buss.de/rs232toi2c/
Was not too difficult, all registers are documented in the Technical Reference Manual (TRM).
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PSoC examples
« Reply #48 on: September 07, 2014, 04:30:21 pm »
Quote
This, and I don't get what is so superb about them.

I think you have laid out a convincing case that the chip is not for you.

However, the fact that it is not for you has zero bearing on if it is not for the rest of us.

It doesn't take a rocket scientist to understand that, right? Even a geologist should see through that.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PSoC examples
« Reply #49 on: September 07, 2014, 04:41:20 pm »
Quote
Was not too difficult,

It is not if you stay with Cypress tools. Yes, if you don't.

Quote
all registers are documented in the Technical Reference Manual (TRM).

For example, where is GPIO_PRTx_DR register in that manual?

I suppose that there is a header file somewhere in Creator but why cannot they just provide that to everyone?
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf