Author Topic: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?  (Read 59569 times)

0 Members and 1 Guest are viewing this topic.

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
Here's what I've got to wrap my head around:

A lot easier if you have a board to play with.
================================
https://dannyelectronics.wordpress.com/
 

Offline Corporate666

  • Supporter
  • ****
  • Posts: 2009
  • Country: us
  • Remember, you are unique, just like everybody else
I hate to keep sounding like a shill for Cypress but I think this is where the PSoC really shines.  You can configure the chip and give your pins names and set them as I/O's and such.  So a program to turn on an LED when a button is pressed becomes

Can you describe the development environment. Is it free, does it run on Linux/Mac, is it a single package install, does it have decent features (GUI, C code cross reference, debugger, etc).  Cypress is not that popular for ARM (I am relying on that graph in the other PIC vs ARM thread) but maybe just as good. I already got a ST board, then switched to NXP but wouldn't mind to try another one.

OP, another option you have is to wait for the upcoming Arduino ZERO (ARM based) or use the existing Arduino DUE (also ARM based).

-As far as I know it's Windows only (although it seems to run fine under wine, etc)

-It's 'free'.  I put that in quotes, because you get a license for the Keil C compiler free with the software, but each year you have to re-register and get emailed a code

-Single package to install everything, although it does install the "PSoC Programmer" which the IDE uses to program the chips.  The programmer can be run separately if you just want to program a chip, it doesn't need the IDE even installed

-I don't have a ton of experience with different IDE's, but I really like the PSoC IDE.  There is two... PSoC Designer and PSoC Creator.  Designer is only for the old legacy PSoC1 product.  Creator is for PSoC3, 4 and 5.  There is a world of difference between the two... Creator and PSoC3/4/5 is how you would design a SoC if you were starting from scratch.  Designer is how it would be done if you were trying to kludge some PLD stuff onto an MCU.  Which is pretty much exactly how it went... PSoC3/4/5 are clean-sheet designs.  PSoC1 is the first iteration from many years back.  The Creator IDE supports full debugging - breakpoints, memory location and variable watches, stepping into and through code blocks, etc.  All of that is supported in the PSoC3/4/5 chips without any debug versions or external hardware required.  I find the GUI itself pretty good but again I don't have a ton of experience.  I'd say it's easily better and more powerful than the Atmel IDE (the only other one I have much experience with). 


I still have an NXP board sitting around that I never got to... maybe some day when I get more time :)  Like I said, the great thing about the PSoC is the chips are sort of like a canvas, and you drag-and-drop the peripherals you like.  I have a PSoC3 with 30 PWM's on it controlling an LED array.  I've got others where I messed up my board layout and accidentally ran signals to the wrong pins but was able to just reconfigure my peripherals to run on those pins instead - saved my ass a few times.  Cypress is always coming out with new libraries/peripherals too... so they have stuff like UART's, DMX controllers, various LED lighting and color mixing methods (including color correction through optical feedback), etc.  It sounds complex, but for example if you want to measure temperature, they have a temperature object you drag and drop into your design, configure it (i.e. pin to read from, range, etc) and then you get a full API and can just say "if (myTemp.CurrentTemperature > 50)" instead of having to calculate anything or scale ADC values, or even having to know how to use an ADC in the first place.

I started with PSoC1 which had a lot of quirks and bugs.  PSoC3 was like driving a Lambo when all you've driven before was a 1984 Ford with 200,000 miles.  PSoC1 there is a single GPIO interrupt for read or write that runs for all pins.  PSoC3/4/5 you just drag and drop a pin component onto your design, drag and drop an interrupt component... double click and set the pin to input, pulled low and "interrupt on high" and draw a line to the interrupt component, then add your code to the C file the interrupt component created and you're done. 

That PSoC dev kit I posted earlier CY8CKIT-049-42XX was something like $5 from Cypress and the IDE is free.  If you're at all interested, I'd give it a shot.  I fell in love with these chips and I use them whenever I can unless I *really* have to use something else.   And even then, Cypress is pretty cool to work with... I was using a competing chip for $0.29 and the cheapest PSoC was $1.10.  They said "no problem, we'll drop your price to $0.29". 
It's not always the most popular person who gets the job done.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Just to add one thing, Creator 2.0 and Creator 1.0 where open sourced and you can download it (haven't done that myself) the current one Creator 3.0 doesn't seem to be open source but I haven't burn the CD image so maybe, since the iso is way bigger than the installable app.

The source provided supports ARM and the 8051 so it should have support for the PSoC4 at least and maybe to the PSoC5 (not the 5LP that substituted the 5).

Not sure what chips Creator 2.0 supports or how the IDE differs since I've been only using it since Creator 3.0.
Also not it's C only but I believe there is a work around to enable C++, but haven't had a need to do so yet.

Creator 3.0 will export the projects to eclipse kiel and some other, don't recall.

It does have an internal regulator too and it can operate in different power mode configurations, check the datasheet for details, at least this is for the 4200 series haven't looked at the details of the 5LP yet.
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Miguelvp:

What website do I visit if I want to buy the Smartboards you mentioned in your helpful post?
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
There are also others:

http://www.cypress.com/psoc5lp/?source=CY-ENG-HEADER

click under kits and you'll see third party kits, but the smartchboard looked like the best of the bunch.

but you can get a PSoC 4200 prototyping board for just $4 + shipping (will cost more than the boards)
Edit: shipping is $4 for 2 day fedex in the US.

http://www.cypress.com/?rID=92146

The 4100 in there doesn't have analog but has programmable digital, the 4200 has both.
« Last Edit: August 29, 2014, 02:51:22 am by miguelvp »
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6193
  • Country: us
Corporate666, thanks for the detailed information. Just look at some of their chips. The ones with larger flash (128k, 256k) seems to be on the expensive side. This one though looks very interesting http://www.digikey.com/product-detail/en/CG7999AA/CG7999AA-ND/4729049  $1 in unit quantities, 32K flash, 4K RAM, 48Mhz.

I am doing all my computing on a small 11" Mac OSX that I carry everywhere. I would hate to have to use a different computer for the IDE. Arduino, LPCExpress and Eagle give single package installs that run natively on my computer. I wish Cypress would do the same.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
This one though looks very interesting http://www.digikey.com/product-detail/en/CG7999AA/CG7999AA-ND/4729049  $1 in unit quantities, 32K flash, 4K RAM, 48Mhz.

That will be the QFN that cypress offers for also $1 no minimums and free shipping worldwide:

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

I ordered 20 of the QFN by mistake They came on nice cases with 6 each and one with just 2. I wanted the SSOP, so I reordered 10 of the SSOP and 10 QFP

I'll use the QFNs eventually but the QFP has 4 extra pins and the SSOP has less but easier to solder :)

Edit: the $1 per chip offer expires at the end of September btw.

http://www.cypress.com/events/?event=psoc4promotion&utm_source=Homepage&utm_medium=Banner&utm_campaign=PSoC4USD1
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6193
  • Country: us
That will be the QFN that cypress offers for also $1 no minimums and free shipping worldwide:

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

I ordered 20 of the QFN by mistake They came on nice cases with 6 each and one with just 2. I wanted the SSOP, so I reordered 10 of the SSOP and 10 QFP

I'll use the QFNs eventually but the QFP has 4 extra pins and the SSOP has less but easier to solder :)

Edit: the $1 per chip offer expires at the end of September btw.

http://www.cypress.com/events/?event=psoc4promotion&utm_source=Homepage&utm_medium=Banner&utm_campaign=PSoC4USD1

I see, this is a special limited time price. Too good to be true, though the 32K flash is on the low side.

BTW, nothing wrong with QFNs. You can solder them by hand. You just need good tacky flux, thin solder tip and some magnifier.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
I see, this is a special limited time price. Too good to be true, though the 32K flash is on the low side.

BTW, nothing wrong with QFNs. You can solder them by hand. You just need good tacky flux, thin solder tip and some magnifier.

So I got the chips today, the SSOPs came in a small tube section cut to length.
The QFPs however came in a big ass tray (8x20) with a supporting tray on top (also 8x20) to keep the chips in place, all that to ship just 10 chips in a package that could hold 160 chips securely. They sure loose money on these, since they are pretty much shipped as samples instead of production. I was expecting the QFPs to come on the same type of packaging ast the QFNs, on little cases holding 6 each.

Edit: They all came (SSOP, QFN & QFPs) in vacuum sealed antistatic thick non translucent bags, each with humidity indicators to indicate if you need to bake the parts if exposed to too much humidity.
« Last Edit: August 30, 2014, 12:28:34 am by miguelvp »
 

Online Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
That,s because the whole free shipping sample system is intended for businesses that will buy hundred of thousands , millions if the chip is used in their products.
Not for hobbieists that use ten of them in their gadgets.
Each semicon company has their own way of doing this, if you are an active member and part of a big company with a lot of sales you are asked actively if they can ship you their newest $200+ dev board for free ;) unfortunately another of my colleagues has this opportunity, leaving the rest of us often drooling about all the goodies he gets.
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Can anyone tell me the advantage (disadvantage is cost=$99) CY8CKIT-002 PSoC® MiniProg3 to start work with the
PSOC4200 eval kit even though it has already a built-in USB interface to program?

Is it that I could have use of more program code space because I would not need bootloader code with the MiniProg3?

Would the MiniProg3 allow me to  compile and program and debug the PoSC4200 much quicker?

Much easier to program the breakout part of the project eval board once it is already soldered into a project?

What is the size of the bootloader..since the whole program max is 32K ?

Is there a chance this same MiniProg3 device could be also used with PoSC 5xxx series later on?





« Last Edit: August 30, 2014, 07:33:22 pm by SuzyC »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Can anyone tell me the advantage (disadvantage is cost=$99) CY8CKIT-002 PSoC® MiniProg3 to start work with the
PSOC4200 eval kit even though it has already a built-in USB interface to program?
The MiniProg3 (which I don't have) allows you not only to deploy the code without the bootloader but it also allows yo to directly program and debug your code. The bootloader approach won't let the IDE step through code.

I do have a Pioneer dev kit ($25) that has a 4200, it uses also a 5LP programmed to be the debugger interface so it allows me to step and deploy code as if I was using the MiniProg3. At $90 I can live with using that to debug code and use the prototype boards without being able to step through the code.

On the MiniProg it will say MiniProg3 instead of KitProg.
Edit: No idea if I could use the Pioneer to program the prototype kits, that would be cool if I could get a programming header that is compatible, will have to look into the pioneer datasheet since it has a lot unpopulated headers including the 5LP programming header.

In action:

More info on the MiniProg3 and alternatives:

http://www.cypress.com/?rID=38154&source=shop
http://www.cypress.com/?rID=2543
http://www.cypress.com/?id=4&rID=52895

Is it that I could have use of more program code space because I would not need bootloader code with the MiniProg3?

The nice thing about PSoC modules is that they include datasheets, and of course the bootloader has it's own datasheet, here is the relevant part about resource usage. So my understanding is yes, you will have more space and no need for the bootloader, but I only have the pioneer kit programmer to base my answer on.

Would the MiniProg3 allow me to  compile and program and debug the PoSC4200 much quicker?
Yes, actually you can only debug if using the MiniProg3.

Much easier to program the breakout part of the project eval board once it is already soldered into a project?
Not sure if easier. You can use the USB-UART left over part and use it to program the device, but you can also use the 5 pins reserved for the miniprog.
One thing, in order to program it via the USB-UART you have to hold reset while powering it on, so it will be easier with the miniprog.

What is the size of the bootloader..since the whole program max is 32K ?
Look on the attached picture above.


Is there a chance this same MiniProg3 device could be also used with PoSC 5xxx series later on?

Yes it supports the 5LP and will think future products and non cypress devices as far as I know.

repeated link from above: (edit fixed to be the right one)
http://www.cypress.com/?rID=2543

« Last Edit: August 30, 2014, 08:50:03 pm by miguelvp »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
ship you their newest $200+ dev board for free

A co-worker of mine had a drawer full of a USB stick (90usb1287 I think) that reps for atmel handed out to him. They were retailing for a lot, particularly during the ps3 jailbreak days.

Quote
cost=$99

That's two dinner plates for me -> lots of money.

If I were you, I would go back, look at the suggestions provided before and ask yourself how sure you are that this will work out for you. If you aren't 100% sure, it may make sense to go with a lower cost approach -> I wouldn't lay out more than my lunch money for this.
================================
https://dannyelectronics.wordpress.com/
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
It's $90 but yeah a bit pricey that's why I decided to live without it.

But they have plenty of information about programming the devices with SWD.

PSoC 4 CY8C41XX, CY8C42XX Programming Specifications pdf includes details on SWD (Serial Wire Debug).
http://www.cypress.com/?rID=78468

Equivalent docs for 3 and 5 series:
PSoC® 3 Device Programming Specifications (CY8C32xxx, CY8C34xxx, CY8C36xxx, CY8C38xxx CY8CTMA39x, CY8CTMA8xx, CY8CTMA6xx)
http://www.cypress.com/?rID=44327

PSoC® 5 Device Programming Specifications (CY8C52xxx, CY8C53xxx, CY8C54xxx, CY8C55xxx)
http://www.cypress.com/?rID=46790


That doesn't mean that it will be easy to roll your own SWD programmer, but in theory you can use one of the breakout boards to implement a compatible programmer.

On the bootloader approach here are more links:

AN73854 - PSoC® 3, PSoC 4, and PSoC 5LP – Introduction to Bootloaders
http://www.cypress.com/?rID=56014

More info about the bootloader:
http://www.cypress.com/?rID=50230

Also you can roll your own using an external micro (including another 4200)
AN73054 - PSoC® 3 and PSoC 5LP Programming Using an External Microcontroller (HSSP)
http://www.cypress.com/?rID=57435

It doesn't touch the 4 series but should be about the same, also I didn't look in the zip files to see what implementations they have and if they will be compatible with the PSoC Creator 3.0. Well decided to take a peak and they do have a PSoC Creator 2.0 SP1 project for both chips including the SWD code. But didn't play with it. Of course the USB to the programmer might need to be implemented unless it's there already.

There is one for the 4 series as well:
http://www.cypress.com/?rID=81013

Edit: What do you know, they have the code in there to use the pioneer to program the built in PSoC 4, and of course there is a 12 pin header for the PSoC 5LP so I could change the SWD pins to go to the external header instead. hmmm maybe I will try to see if I can program/debug the 4200 prototype board with the pioneer.



The problem with Cypress is that they offer a ton of information and the shear amount is a bit overwhelming. Not really a problem because poor documentation will be worse.

So dannyf is right, it all depends how much you want to commit to the chip
« Last Edit: August 30, 2014, 10:10:23 pm by miguelvp »
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Posts below all seem expensive for a tryout exercise  ... I moved from MC 8 bit to 16 with the microstick 2  ( and asm to C )
http://uk.farnell.com/microchip/dm240013-2/pic24f-k-series-5v-usb-dev-board/dp/2311907?ref=lookahead

Basically all you need  to code . program and debug @5V   I eventually swapped the pic to PIC24FV32KA302 here used with USB / serial BOB to develop snippets of code to paste into projects .
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4208
  • Country: us
I think that those "Pioneer" boards ($25-30) are the happy compromise between the CPU breakout boards (which would be OK for embedded a PSOC4 in a project) and the $100 debugger full "eval kits."  I'm pretty sure you're supposed to be able to use the Pioneer to debug other PSoC chips...
http://www.cypress.com/?rid=77780
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
I think that those "Pioneer" boards ($25-30) are the happy compromise between the CPU breakout boards (which would be OK for embedded a PSOC4 in a project) and the $100 debugger full "eval kits."  I'm pretty sure you're supposed to be able to use the Pioneer to debug other PSoC chips...
http://www.cypress.com/?rid=77780

Not directly because there is no source for the kitprog image that comes burned into the 5LP, at least they have the image so you can recover it to factory default.

I just added a 5 pin header to one of the prototype boards and I'm going to modify the code to use the 12 pin header hooked to the 5LP to try to program/debug the prototype board.
AN84858 - PSoC® 4 Programming Using an External Microcontroller (HSSP)
http://www.cypress.com/?rID=81013

But I don't think that code has debugging capabilities, as it's not the kitprog code, we'll see. But even if I can use it to program it it might be possible to use that code base to make a full fledged programmer/debugger.



« Last Edit: August 31, 2014, 01:41:43 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
So It works as a programmer but after configuring the PSoC5LP in the pioneer kit, it only shows as a communication port, because the code just seems to wait for a key to program the chip.

But the cool thing is that it does succeeds to program it after I changed the pins to use the external header instead of the built in 4200





Edit: the sample has the hex image in the code so there is no communication from the PC, but all the bits are kind of there, source to the KitProg would be ideal.
« Last Edit: August 31, 2014, 12:27:33 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Hold the presses:

PSoC 5LP Programmer Firmware

http://www.element14.com/community/thread/27067/l/psoc-5lp-programmer-firmware

With KitProg version 2_03 code :)

Will try that next and update if it works.

Edit: read the comments on that thread, specially the last one with updated code.
Edit2: and also it's worth while to not that they say in the post to feel free to copy the PSoC 5LP portion of the pioneer since the schematics and board layout for the pioneer is available as well from Cypress. They keep on impressing me more.
One thing is that you don't want to upgrade the bootloader when it loads or it fails to compile, still trying to compile it.
« Last Edit: August 31, 2014, 01:46:05 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
It compiles and works programming the included PSoC4200 on board

Not only that but it has code implementation for the HID interface to the PC.
Now to alter the code to use the external pins instead.

Edit: seems there are some pin definitions hidden within the program, the AN84858 example before did the same as noted in the diagram:


But I can't seem to find them. It shows the KitProg interface but no board attached to it.

Edit: I'm finding them but they are a bunch of defines of defines so it might take a while since there are dependencies and assuming pin order so I can't use the macros for non sequential pins. But it seems doable.
« Last Edit: August 31, 2014, 03:46:10 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
So because of "AN84858 - PSoC® 4 Programming Using an External Microcontroller (HSSP)" the program uploaded to the prototype board lost the bootloader, so I can only program it via that program or get a miniprog 3 or figure out how to do it with the kitprog source.

But there is another way. You can also use another prototype board to program it and restore the bootloader:

http://www.cypress.com/?id=4&rID=98796

Note that you can't debug with this method so I'll have to pursue the pioneer route.

It's late so I think I'll resume later but I have a busy day tomorrow but I have Monday and Tuesday off, so hopefully it's done by then.

The MiniProg3 looks cheaper the more time I put into this other than I'm having fun figuring out the details on these MCUs.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Thought I would post a MPLAB  X (2.15) screen shot of microstick 2 in action.  mainly to show the debug , SFR views ,  this is the paused shot of trying to understand the workings of the AD. I'm still in a learning phase .
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27006
  • Country: nl
    • NCT Developments
Posts below all seem expensive for a tryout exercise  ... I moved from MC 8 bit to 16 with the microstick 2  ( and asm to C )
http://uk.farnell.com/microchip/dm240013-2/pic24f-k-series-5v-usb-dev-board/dp/2311907?ref=lookahead

Basically all you need  to code . program and debug @5V   I eventually swapped the pic to PIC24FV32KA302 here used with USB / serial BOB to develop snippets of code to paste into projects .
The problem is that if you look for a cheap solution you may end up with a solution which isn't optimal. I've spend quite a lot of money on self made boards with ARM controllers from NXP and ST just to try them out in a 'real' circuit. OTOH I have used most of those boards in various prototypes/projects so they did pay for themselves in the long run.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4208
  • Country: us
About that "easiest" in the title...

With greater power comes greater complexity, almost always.  So a "greater" CPU is going to be somewhat harder.  Which means perhaps the question should be "which "harder things" are not too hard, or most interesting, or most valuable to learn next", where "most valuable" probably means "of general use on a lot of CPUs in that class", rather than something that is really specific to a particular family.

With that re-wording, I'm not sure that the PSoC is a good choice.  It has unusual (user-defined) peripherals (sort-of, more-or-less?)

(The biggest thing to get used to in most 32bit architectures is the way that they have a single HUGE address space, and will throw big chunks of memory space at each peripheral.  "GPIOA appears on both a moderate speed and a high speed bus, and has 256 WORDS of address space in each that are used to allow bit-specific addressing.  In addition, both of those address spaces also appear in bit-band regions, which gives you a different sort of bit-specific addressing."  (TI Tiva example.))
« Last Edit: August 31, 2014, 09:52:43 am by westfw »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf