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

0 Members and 1 Guest are viewing this topic.

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #175 on: October 09, 2014, 02:15:43 am »
...and you expect it to have peripheral capabilities similar to, say, an ATmega chip: UART, SPI, I2C, ADC and several timers.  And it's not "obvious" from the datasheet which of those requires one or more UDBs...

Really? It was completely clear to me before I started that the peripherals in the datasheet had nothing to do with the UDBs. If you think there is a documentation problem, let Cypress know. But literally, right on the first page of the datasheet, under "Features," it shows all of the features and the "programmable digital" is completely separated from Serial Communication (saying it has 2 independent units), Timing and Pulse-Width Modulation (saying it has 4), Capacitive Sensing, etc. All of these do not require UDBs to function, just as is implied because there is a programmable digital section and it doesn't say they use it in the datasheet.
 

Offline Zeta

  • Contributor
  • Posts: 49
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #176 on: October 09, 2014, 05:08:30 pm »
Quote
If you need more than 4 UDB's, why would you buy a chip with 4 UDB's?
Not fair.  If you're "evaluating" the PSoC, you don't yet have a clear idea how UDBs are related to the peripherals that you can actually implement.  You're told "This is an 8-bit microcontroller replacement, only better", and you expect it to have peripheral capabilities similar to, say, an ATmega chip: UART, SPI, I2C, ADC and several timers. 
You are told this is a Programmable System on Chip that can do everything a microcontroller can do and more and the fact that the psoc4 is the smaller cheaper of the products. If you were seriously evaluating a psoc you would have at least read the product description and datasheet. Expecting the product list something like 2 UARTs / 1 I2C / 3 counters is like expecting a cpld datasheet list those periperals and it means you have not got it yet.
Datasheet for every part list the number of UDBs plus fixed function peripherals available.
And it's not "obvious" from the datasheet which of those requires one or more UDBs...
every component datasheet has a "Resources" and a "Api Memory" section where you can find out how many macrocells, datapaths, etc the component and it's api use. 

if you read the datasheet you will find out what's inside of a UDB. Rule of thumb for non optimized /placed UDB based component is 8bit-component-->1 UDB 16bit-component--->2UDB
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #177 on: October 09, 2014, 10:57:45 pm »
For most hobbieist stuff 8 bit rules, but since the ARM32's are going down in price and also start to offer low power alternatives it is becoming a grey area and interesting time.

I used to think so too (about hobbyist, 8-bit, etc.), but I think once there are better guides for newbies, those low-end ARMs are going eat AVR alive.  I needed a micro in a simple sensor application the other day... so I looked at my options.  Needed 1 USART, i2c, and some GPIO -- nothing special.  Most of the really inexpensive AVRs didn't have the combo I needed, so I had to choose between the ATtiny 2313/4313 or an ATmega.  Minimum, $1.80 per... more like $3 if I wanted a whole kilobyte of RAM.

OTOH, there were lots of options in the CM0+ space that would fit the bill, many of which could be had for $1.50 or less.

Whew.  I fought it for a while, but I think some of you guys that have been saying this for a while are right.  AVR's days are numbered.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #178 on: October 10, 2014, 12:28:22 am »
For most hobbieist stuff 8 bit rules, but since the ARM32's are going down in price and also start to offer low power alternatives it is becoming a grey area and interesting time.

I used to think so too (about hobbyist, 8-bit, etc.), but I think once there are better guides for newbies, those low-end ARMs are going eat AVR alive.

...

Whew.  I fought it for a while, but I think some of you guys that have been saying this for a while are right.  AVR's days are numbered.

On one hand, I am not convinced that ARM will be able to compete at the lowest power and standby power levels where the 8 bit microcontrollers like AVR and PIC outperform them but on the other hand, I also cannot see that being a viable long term market.  On the gripping hand, something has to exist in this market and 8-bit parts are always going to be more power efficient in this type of application.
« Last Edit: October 10, 2014, 12:30:44 am by David Hess »
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #179 on: October 10, 2014, 12:38:46 am »
Zeta and True seem to be saying opposite things about UDB requirements of peripherals on PSoC.  No wonder I'm confused. :-(
I attended some Cypress 1-day training seminar for PSoC (3 or 5; this was before the PSoc4 came out.)   On PSoC 5, UARTs and SPI definitely needed to use the configurable logic.  (Looking at old datasheets, it seems that on PSoC 1, even timers used the logic.  It looks sorta like Cypress has gradually moved "common" peripherals to stand-alone logic. catering to SW people over HW designers...)
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #180 on: October 10, 2014, 12:44:45 am »
On one hand, I am not convinced that ARM will be able to compete at the lowest power and standby power levels where the 8 bit microcontrollers like AVR and PIC outperform them but on the other hand, I also cannot see that being a viable long term market.  On the gripping hand, something has to exist in this market and 8-bit parts are always going to be more power efficient in this type of application.

PSoC 4200 (M0) measured while running 5 mA.

Other modes from their datasheet:
Sleep 1.3 mA (opamps operational)
Deep Sleep with 1.8 to 3.6 V input: 1.3 uA
Deep Sleep with 3.6 to 5.5 V input: 15 uA
Hibernate: 150 nA
Stop: 20 nA

The last two (Hibernate and Stop modes) are resumable by GPIO
« Last Edit: October 10, 2014, 12:46:40 am by miguelvp »
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #181 on: October 10, 2014, 02:38:59 am »
Minimum, $1.80 per... more like $3 if I wanted a whole kilobyte of RAM.

OTOH, there were lots of options in the CM0+ space that would fit the bill, many of which could be had for $1.50 or less.

AVR's days are numbered.

I've been hearing that for the past 15 years starting not too long after they first became popular. Same for 6502 and 8051 which to this day are tucked away in half the products out there. Kinda like Mac and Linux guys who carry around signs saying "Wintel is Dead" but their own market share doubles every month (actually stays unchanged at single digit percent combined).

Along with helicopter in every garage and space ship in every back yard futurists been predicting the death of 8 bit since 16 bit TI unveiled in second issue of byte magazine. Having played around with these new fangled 32 bit wonders for some time now (ONE whole month!) I'm convinced there's no huge advantage over the old timers in performance, features, or cost and a long ways to go on tools and community support.

IMO the end is (far from) near.

BTW brand new MEGA8A with 1K can be had on Aliexpress for 40 cents each and MEGA328 (2K) for about 90 cents, 20pcs and 10pcs respectively. About half in thousands. The only competition in that category last few years is STM8 at a quarter each hobby or 15 cents dannyf-qty. Nothing even close in ARM-land. Do the math.
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #182 on: October 10, 2014, 02:56:18 am »
Minimum, $1.80 per... more like $3 if I wanted a whole kilobyte of RAM.

OTOH, there were lots of options in the CM0+ space that would fit the bill, many of which could be had for $1.50 or less.

AVR's days are numbered.
I'm convinced there's no huge advantage over the old timers in performance, features, or cost
Really? Because pick 2 out of 3 of those and you'll find it with the cheap ARMs out there.

$0.29 CM0 in small product run quantities?
180MHz CM4? Or 72MHz CM3 for ~$1.60? With 5 UARTs, tons of timers and PWM, DACs, USB, and other stuff you might use?

If you said cost for the lowest-end-possible-for-application in high quantity, maybe. For low to medium quantity where it matters less, for performance and for features you couldn't be farther off the mark though.

8-bit has its place and it isn't in performance or features anymore :)

Quote
BTW brand new MEGA8A with 1K can be had on Aliexpress for 40 cents each and MEGA328 (2K) for about 90 cents, 20pcs and 10pcs respectively. About half in thousands. The only competition in that category last few years is STM8 at a quarter each hobby or 15 cents dannyf-qty. Nothing even close in ARM-land.
I'm not understanding your argument - you are making various points, then defending only one of them at the expense of the others. But hey, if you trust your ghost shift chips or metal-slug-in-package products, and they're fast enough for your application, go for it!
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #183 on: October 10, 2014, 03:41:26 am »
hey, if you trust your ghost shift chips or metal-slug-in-package products

As part of my day job I purchase and test large quantity integrated circuits and have to laugh at those old wives tales. Many years ago Scenix/Ubicom, a marginal cohort of Parallax, produced super-PIC clones with a steel slug installed to dissipate heat from the regular die overclocked at the amazing (for that time) 50mhz. It's hard to imagine what purpose this would serve today. Heavy chips better than light ones?

As far as fakes it's unlikely anyone in the Evil Empire would produce those when refurbs are available for 1/20th the cost. Few over there have silicon foundry or glass/epoxy injection lines in the basement. Having had literally millions of chips pass though last few years there has not been a single case where Ebay or Aliexpress Buyer Protection did not solve any problems to my satisfaction. Mother company Taobao is bigger than Amazon, Ebay, Bonanza, and the others combined and not by screwing people. In case it escaped attention yesterday one famous Asian country surpassed USA as world leader in trade AND gdp. That means worlds largest economy and they didnt get there by selling fake ICs.

I see two major factions in the purchasing/procurement world: neopatriots and xenophobes for whom Digikey and Mouser are it, and the rest of the world that depends on reliable and low cost materials for long term survival. I'm not complaining because, as I've said before, without suckers to shell out for inflated margins to support marketing and infrastructure it wouldn't be possible to snag the great deals for myself and clients.


Quote
BTW brand new MEGA8A with 1K can be had on Aliexpress for 40 cents each and MEGA328 (2K) for about 90 cents, 20pcs and 10pcs respectively. About half in thousands. The only competition in that category last few years is STM8

I'm not understanding your argument - you are making various points, then defending only one of them at the expense of the others.

My point was these are all 8 bit parts and even for the worst of those there is nothing similar in the 32 bit world with any great advantage.


« Last Edit: October 10, 2014, 06:07:50 am by paulie »
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #184 on: October 10, 2014, 06:54:01 am »
blathering
If your religion makes you happy. What does it have to do with easy to move to "greater than 8-bits" MCU? Create a new religion thread maybe?


My point was these are all 8 bit parts and even for the worst of those there is nothing similar in the 32 bit world with any great advantage.
Well, that certainly wasn't what I expected as that is a pretty clever simplification of the nonsense you wrote originally. But to entertain your new point, while there may be nothing "similar" (if all factors are combined rather than separated as in your original argument), if it isn't what is needed, it isn't what is needed. Find the part that fits the application. Your argument is still pointless. Basically all you argued is you can buy some low spec chips for cheap and therefore they are the best at everything because of that. Congrats I guess? I vehemently disagree. Regardless, what does it have to do with easy to move to "greater than 8-bits" MCU or discussion of said "greater than 8-bits" MCUs?

I will refrain from responding to any of your future posts in this thread, as nothing formative much less on-topic comes of it.

---

SuzyC, I went ahead and looked at analog part PSoC 4100/4200 TRM, and a possible on-chip solution for your analog ADC input impedance situation would be to use the built-in op-amps. You can assign any pin to them on either of the two AMUXBUS then use the output of the op-amp on the SARMUX bus as an input for the ADC. There is even an example shown on page 203 of the TRM for doing this in single-ended or differential mode. And again, this works on any AMUXBUS pin, which as I understand it means all I/O pins can support high-impedance analog.
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #185 on: October 10, 2014, 07:29:52 am »
blathering

Probably a good idea to refrain from responding if fabricating quotes and squealing about "religion" instead of reasonable discussion is the best you can do. It tells me something was hitting close to home.

http://en.wikipedia.org/wiki/Psychological_projection
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #186 on: October 10, 2014, 11:36:13 am »
Quote
8-bit parts are always going to be more power efficient in this type of application.

Generally not true. MSP430 and some CM0+ chips from Energy Micro and Freescale are generally leading the pack on current consumption.

The comparison, however, isn't exactly fair in that 8-bitters generally don't offer the ability to turn off peripherals and 16/32-bit chips generally do offer peripheral-specific clock management.

However, even if you were to compare full-out, those CM0 chips offer comparable current consumption vs. 8-bit chips - I tested some in the ghetto thread for example.
================================
https://dannyelectronics.wordpress.com/
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #187 on: October 10, 2014, 09:51:42 pm »
Squealing reasonably in the face of hypocrisy

LMFAO. At least the gummint gets a little break now.  One thing is for sure it takes a real sense of humor to survive on the internet. More blathering:

8 bit vs 32 bit discussion don't sound too far off topic here to me. It looks like noobs have a tendency to develop 32 bit stars in their eyes because... well... it's 32 BIT! Just the sound of that makes you want to jump on board. At least that was the case with me. It's hard to stand back and simply analyze real needs when there's such a gap between reality and perception.

I don't say whether 32/8 one is better than the other in all cases. MEGA328 is not a good choice for Android tablet or cell phone but neither is top of the line ARM best bet for a dollar store color LED toy. My comments were more relevant for majority applications like hobby and mid level commercial products which seem to be the main subject in this forum.

After running a dozen different ARM chips from 5 makers last few weeks I conclude they do not have a big leg up over the oldies. More memory but they NEED more. The GPIO ain't that fast either after clock restrictions. 72mhz sounds great untill you actually try to see how fast a pin can wiggle.

103c: Best deal in the $1 ARM arena considering features and performance. Not the only deal though. LPC has definite advantages (all bits on one port, etc) as does Silabs (DAC!).

STM8: Lowest cost MCU with reasonable capability. Lowest cost PERIOD!

PIC/AVR: Best choice for hobby and quick turn commercial. No equal for support and availability. I predict here to stay.

IMO the current hype and infatuation over 32 bit is overblown but that don't mean I'm saying they are useless.
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #188 on: October 10, 2014, 09:59:01 pm »
I don't think it's just xenophobes, et all, that are concerned about product sourcing.  The whole traceability thing is a pretty big factor.  Can you imagine if, in any of the number of recent auto industry recalls, the manufacturer had said "well no, we can't really guarantee the MCUs were genuine -- we got them for a few cents apiece from Alibaba.."

Hobbyists do whatever they want, and that's cool.  So does much of the gray market, and you usually expect the products there to be of dubious quality and reliability.  But, when you buy a name-brand product -- and without question, when it's possible that product could harm you or others if it behaved erratically -- no one... is going to be looking for the dirt cheap deals on auction sites.  ;)

That said, I don't have any insight on the direct-to-vendor sales numbers, or the deals you might strike with distributors for large (but not quite that large) quantities.  I didn't even compare the 1000 qty prices, for example, so it could work out differently.  Still, after dipping my toes in the ARM waters, those AVRs look awful expensive for what you get.  Just an opinion, subject to fallacious reasoning and conclusions jumped-to.  I could be dead wrong, and often am.
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #189 on: October 10, 2014, 11:28:48 pm »
Why the PSOC4 is a POS..a brief reply to some Corporate comments:

I said, "The PSOC4 documentation for most UDB (functional blocks such as PWM ADC etc) are so very vague and poorly explained that it required hours upon hours to experiment,  trying to understand how to get these functional blocks to work.
    For instance the PWM requires code to turn off and on the PWM just to set  Duty Cycle to zero, else the DCyC reverts to 100% when it should be 0, (PWM single output compare match for PWM Duty Cycle) for a simple single-output PWM."
-------------------------------------------------
But  some kind of Cypress apologist says,"I disagree that the datasheets are vague.  If anything, they are excruciatingly detailed, going into clock cycles for various commands, memory usage, interactions with other parts and more.   For example, just the PWM datasheet alone is 46 pages, the ADC datasheet is 30 pages, etc.   They also note in every datasheet that you can get example code and sample projects right from within Creator by clicking "File -> Example Project".  There you can filter by PSoC family, chip range and example type.  There are 3 example projects just for the PSoC4, 4200 family, ADC which show the component in use (and you can compile and use the samples if you like)."
-----------------------------------------------------
Let us look at my experience with creating a simple PWM:

Eager to learn how to use this part, I enthusiastically found that  Cypress offers two Tutorial Videos (each less than a few minutes long) about how to use PSOC Creator. In fact, the first introductory video features how to create a  PWM without using any C-code.

What astonished me was how Cypress might consider this as such wonderful HW accomplishment of PSOC Creator. If I wanted to blink a LED without any C-language code, me or any other electronic noobie could so easily do this with a 555 timer rather than going to the trouble of purchasing a PSOC4 eval. kit. It would seem the purpose of any tutorial on how to use a powerful, versatile 32-bit CPU would be to show that the chip could be programmed, to be used for something more than blinking an LED, to be programmatically used for something more than the most trivial of MCU tasks.

Secondly, after going through the 40 or so pages explaining the PWM  UDB, I was quite astonished, that all this info does not even show how to code the most common and simple single output PWM module. I would expect to be quickly shown how to create  a single output PWM (that is, a PWM UDB with a single output that can be programmed to vary from 0 to 100% to control power without dangerously reverting to 100% duty cycle when a programming attempt is made to set the duty cycle to 0.)  But I don't find this coding info, almost no useful c-code for any PWM purpose.

Ok, so I reminded by some Corporate advice, "There are always Examples to further explain how to use a UDB (in this case PWM) module.
So I search the Cypress 42xx family Project Examples of PWM and I find the one and only one PSOC4 Example It clearly shows me how to initialize and start an example PWM, nothing more, actually showing a few lines of  c-code, however it amounts to nothing, just what is needed to start the PWM module, nothing about usefully controlling duty cycle.
« Last Edit: October 11, 2014, 12:19:07 am by SuzyC »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #190 on: October 10, 2014, 11:41:24 pm »
32 bits is a big deal, at the same frequency you can work over 3 times faster than 8 bits, I don't dare to say 4 times but it's somewhere in between.

At SuzyC, the examples he is indicating are built in Creator 3.0. I'll put more details on how to access those in a bit.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #191 on: October 10, 2014, 11:47:22 pm »
Quote
just what is needed to start the PWM module, nothing about controlling duty cycle.

It may not be bad.

For example, I use a set of routines to manage my own pwm generation (not on your particular chip but on a set of chips from 8-bit avr, 16-bit pic to 32-bit CMx) and all you need to is to initialize the pwm module, set the period and then alter the duty cycle for the specific channels.

I am sure you can do that on your psoc chip as well.

The key is really to slow down and learn the chip, the environment (compiler, ide and libraries, and in this case, the programming approaches) and practice.

================================
https://dannyelectronics.wordpress.com/
 

Offline SirNick

  • Frequent Contributor
  • **
  • Posts: 589
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #192 on: October 10, 2014, 11:47:37 pm »
Welcome to ARM development.  You get two videos:  One, showing you how to install the IDE.  ("Choose a folder.  Click next.  Click I Agree.  Click next.")

Then, another showing you the vendor's dev kit running 3-phase motors, driving an LCD, communicating via Ethernet, and enumerating as a USB device.  They refer you to the example code for more information.

At that point, it's up to you to sit down with a cup of coffee and nothing better to do this week, where you read through C code so ugly, you expect to get frowny emoticons from the compiler.

It is a combination of breaking down the various macros, defines, and mostly uncommented code, and reading 300 pages of datasheet sections, that will eventually get you to the point of writing all the code necessary to duplicate a 555 timer in software.

Anyone on this forum that has successfully gotten an LED to blink has been through this, and unless you want to stay in the PIC / AVR pool for the rest of your days, you will too.  It's not much fun at first, but it's a rite of passage.  You get to add a little peak to your learning curve by nature of having to build your own peripherals as well, but in return you get a notch in your workbench that many others don't have.  Yay you!
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #193 on: October 11, 2014, 12:31:40 am »
Why the PSOC4 is a POS..a brief reply to some Corporate comments:
...
Ok, so I reminded by some Corporate advice, "There are always Examples to further explain how to use a UDB (in this case PWM) module.
So I search the Cypress 42xx family Project Examples of PWM and I find the one and only one PSOC4 Example It clearly shows me how to initialize and start an example PWM, nothing more, actually showing a few lines of  c-code, however it amounts to nothing, just what is needed to start the PWM module, nothing about usefully controlling duty cycle.

If you start PSoC Creator 3.0 and then do: File->Example project, the example project window will pop up. (or you can click in "Find Example Project" under the Examples and Kits link in the Start Page).

Select PSoC4 under Architercture
PSoC 4200 under Family and you find 45 sample workspaces.



Granted they are targeted for other boards so the projects are not bootloadable, but you can add the bootloader and bootloadable yourself (which they do have samples for them as well)

Also most are for the Pioneer (CY8CKIT-042) but that has exactly the same chip as the prototype board, so you can use the same pins in the sample code or change the pins to what is convenient to you.


I wouldn't use the keyword to find PWM examples but look at:

TCPWMExample
PWMExample
QuadDecExample and
TimerExample

For all four configurations of the TCPWM Component options.

If you already have an empty bootloadable workspace, click in the "Add to Existing Workspace" (provided you opened the bootloadable/bootloader project) so you can use the example to use as a reference to modify your bootloadable top design project.

If you select Create New Workspace it will place it in "My Documents/PSoC Creator" by default and name the project in a subfolder  (something like TCPWMExample01)

Also the 100 projects in 100 days has other PWM examples but I already linked those many times earlier.

Edit: to avoid using the Bootloader/Bootloadable you can follow this minitutorial to turn one of your kits into a programmer (not a debugger) but you can use this to program the others without a bootloader.

https://www.eevblog.com/forum/microcontrollers/psoc-examples/msg522554/#msg522554

Of course if you want to revert the changes you will have to use this to program the bootloader back into the prototype board, you can't just press the button to activate the bootloader if it's not present.

« Last Edit: October 11, 2014, 12:37:47 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #194 on: October 11, 2014, 01:41:04 am »
So using the prototype board setup as a programmer as in the second part of that 3 part link:

https://www.eevblog.com/forum/microcontrollers/psoc-examples/msg522554/#msg522554

I opened the TCPWMExample, changed the device to my 2nd prototype board (in my case it's a PSoC 4100 because I wanted one of each) left the pins alone but made sure P0[3] was connected to a blue LED and P0[2] to a green LED.



Yellow wire is SWDCLK, Blue is SWDIO, White is XRES, and power to the rail as well as ground.

After compiling and copying the path of the resulting hex file, I used part 3 to use the python script to program the board.

Total time 5 minutes if that much, and most of the time was setup.

Edit: you don't have to get rid of the usb-uart, detached it because I'm trying to configure is as an I2C to see If I can make a full programmer/debugger with one of these prototype boards.

Edit2: of course this got rid of the bootloader on the target prototype board (the 4100 one) But I can make a bootloadable project and reprogram it so it to restore the bootloader if I had the need for it.
« Last Edit: October 11, 2014, 01:55:49 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #195 on: October 11, 2014, 02:32:47 am »
As for power consumption.

ATmega8A from datasheet:
Power Consumption at 4MHz, 3V, 25 C
– Active: 3.6mA
– Idle Mode: 1.0mA
– Power-down Mode: 0.5uA

PSoC 4200 at 24MHz

Active measured 5mA
Datasheet:
- Active: 6.7mA
- Sleep 1.3 mA (opamps operational)
- Deep Sleep with 1.8 to 3.6 V input: 1.3 uA
- Deep Sleep with 3.6 to 5.5 V input: 15 uA
- Hibernate: 150 nA
- Stop: 20 nA

PSoC Active various frequencies:
6MHz  2.2 mA
12MHz 3.7mA
24MHz 6.7mA
48MHz 12.8mA

So at 12MHz it consumes the same as the ATmega8A
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #196 on: October 11, 2014, 04:59:22 am »
Btw, this is a triple compare pwm example on a single UDB

http://www.element14.com/community/message/84542/l/psoc-4-pioneer-kit-community-project059-but-wait-there-s-more-single-pwm-with-3-outputs#84542

I didn't try it but I did take the other PWM sample and create 4 PWMs.




Here is the resource report:
Code: [Select]
Resource Type                 : Used : Free :  Max :  % Used
============================================================
Digital clock dividers        :    0 :    4 :    4 :   0.00%
Pins                          :    6 :   30 :   36 :  16.67%
Interrupts                    :    4 :   28 :   32 :  12.50%
Comparator/Opamp Fixed Blocks :    0 :    2 :    2 :   0.00%
SAR Fixed Blocks              :    0 :    1 :    1 :   0.00%
CSD Fixed Blocks              :    0 :    1 :    1 :   0.00%
CapSense Blocks               :    0 :    1 :    1 :   0.00%
8-bit CapSense IDACs          :    0 :    1 :    1 :   0.00%
7-bit CapSense IDACs          :    0 :    1 :    1 :   0.00%
Temperature Sensor            :    0 :    1 :    1 :   0.00%
Low Power Comparator          :    0 :    2 :    2 :   0.00%
TCPWM Blocks                  :    4 :    0 :    4 : 100.00% <-- four PWMs all used.
Serial Communication Blocks   :    0 :    2 :    2 :   0.00%
Segment LCD Blocks            :    0 :    1 :    1 :   0.00%

Edit: Oh, and they are all 4 16 bits:


And just for those that are not following from before, this is the PSoC4100 with no analog blocks and "only" clocks at 24MHz
« Last Edit: October 11, 2014, 05:21:34 am by miguelvp »
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #197 on: October 11, 2014, 11:10:51 am »
STM8: Lowest cost MCU with reasonable capability. Lowest cost PERIOD!
Last year you might have been right but this year the shift has already begun and it is shifting towards the new low cost champion: the cortexM0, and I hate to admit it since I am a STM8 admirer.
The single reason is that the M0 is being made in a much smaller nm chip processing technology than the STM8 so one wafer contains many more uC's.
It might not yet show up in low quantity hobby orders with digikey/farnell/ebay etc. but ordering with the factories in huge quantities the STM8 is (going to be) more expensive.
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #198 on: October 11, 2014, 11:43:35 am »
True made similar statements earlier in this thread but it conflicts with my own research. Do you have a link to M0 or any other MCU 8 or 16 bit costing less than 15 "ghetto" cents, $.21 (100pc) I've actually purchased these for, or even the common $.25 STM8S003 pricing?

Maybe more appropriate to continue here:

https://www.eevblog.com/forum/microcontrollers/one-dollar-one-minute-arm-development/msg528533/#new
« Last Edit: October 11, 2014, 12:19:14 pm by paulie »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: HELP! What MCU (greater than 8-bits of smarts) is easiest to graduate to?
« Reply #199 on: October 11, 2014, 11:53:59 am »
Quote
it is shifting towards the new low cost champion

The biggest problem stm8 faces isn't likely cost: there lacks a reason to use such devices. ST7 wasn't terribly popular then and CM0/CM0+ is really killing those chips. So it is hard-pressed to come up with a reason to use STM8 - I have a couple but they are highly limited to niche applications.

ST initially marketed those chips on their peripheral compatibility with the STM32 chips - a promise they largely didn't keep.
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf