Arduino Uno | cy8ckit-049-4200 |
ATmega328P core:
| ARM Cortex-M0 core:
|
22 connections:
| 36 connections:
|
Other things:
| Other things:
|
The next week, I had a question, when I asked it at the professor, at one point I said: "For testing my code, I used a simple Arduino to try it out", and the professor answered that Arduino is trash!
So now... If you have something to make with a microcontroller (in general), which controller would you choose? The biggest, most powerfull one? Or would you look at only what you need?
I tend to stick with C and PIC stuff for most of what I do. It works fine, loads of supporting chips, and a ton of datasheets, App. Notes and books to turn to when things go wrong. Will look into ARM at some point, but only when my projects need it.
But.. a prof is always the prof and need give me a nice score, so I do what he tell me to do.. (that works well for me...)
but you still can program it as efficient in C as a normal PIC..., but it has some features that are usefull for other students who have more problems with programming...First of all you can't program a PIC (or any 8 bit controller) efficient in C. The underlying architectur (cough) doesn't allow it. From 16 bits and onwards things get a lot better. You are also very likely to run into performance issues with the older and slower 8 bit microcontrollers. One of my regrets is that I stuck with the 8051 for far too long and in the end it was just holding me back. I think your professor is right in pushing you towards a modern ARM chip. First of all you won't run into performance limits quickly and secondly your future employer will want to see experience with ARM on your resume.
The professor said we needed to use the cy8ckit-049-42xx, with the reason that it's a quite nice microcontroller and easy to program...
the professor answered that Arduino is trash!
So now... If you have something to make with a microcontroller (in general), which controller would you choose? The biggest, most powerfull one? Or would you look at only what you need?
First of all you can't program a PIC (or any 8 bit controller) efficient in C.
If one of the design requirements is to use a Cypress part, then don't fight it--just use the chip. It'll be much the same after you graduate and a customer chooses some parts you don't like. Flexibility is a good thing to learn, and it won't kill you.
Saying the Arduino is "trash" is a bit strong, but it's not really taken seriously (for good reason, IMO) by embedded engineers. OTOH, the Cortex-M architecture is common in commercial projects and a good one to be familiar with. It's not quite as easy to program as an Arduino, but the Cypress environment is very well done.
Note the Cortex-M is a 32-bit architecture (not 8-bit, as you listed).
First of all you can't program a PIC (or any 8 bit controller) efficient in C. The underlying architectur (cough) doesn't allow it. From 16 bits and onwards things get a lot better. You are also very likely to run into performance issues with the older and slower 8 bit microcontrollers. One of my regrets is that I stuck with the 8051 for far too long and in the end it was just holding me back. I think your professor is right in pushing you towards a modern ARM chip. First of all you won't run into performance limits quickly and secondly your future employer will want to see experience with ARM on your resume.
That still doesn't take away that the Arduino platform + ecosystem is nice for rapid prototyping so if you combine both in your project (Arduino for a quick proof of concept and ARM for the final product) you could get a good grade. Just never ever propose a generic Arduino board + shields as a final solution for something that needs to work reliable for many years.
The Arduino toolchain is close to being trash. However the hardware is a reasonable ATmega328P development board. If you are programming it using the Arduino C++ libraries, the professor's scorn is entirely explicable. If you are programming in C from the device datasheet, hitting the bare metal of the ATmega register set, and keeping the data structures as simple as possible, that is just like using any other 8 bit MCU with similar capabilities.
You also have to consider the available MIPS and the complexity of the task. If the chosen MCU merely provides supervisory functions for the project, then just about anything powerful enough to handle your choice of U.I. will do the job. OTOH, if the task, or your understanding of it is ill-defined, starting out with a more powerful MCU than you initially expect to need can save you a vast amount of work compared to having to port your codebase to a different device if you run out of space or use all the processing time 80% of the way through the project, and can be the difference between success and failure.
Donald Knuth's aphorism "premature optimization is the root of all evil" doesn't just apply to software.
However, I also never choose to use Arduino. The IDE is not productive enough for me, since I am used to much more productive bigger IDE's.The Arduino platform is really just set of a C++ libraries. You can use almost any C++ IDE to write Arduino code. Plenty of people use Eclipse, Visual Studio, etc.
we can relate (almost) everything to the basic stuff we saw already..
If I my post some corrections...
Arduino Uno cy8ckit-049-4200 ATmega328P core:
- 8 bit
- 32kb programmable flash
- 2kb SRAM
- 1kb EEPROM
- 16MHz clock
ARM Cortex-M0 core:
- 8 bit
- 32kb programmable flash
- 4kb SRAM
- 1kb EEPROM
- 48MHz clock
22 connections:
- 14 digital I/O
- 6 I/O support PWM
- 6 analog I/O
- 10 bit A/D converter
- USB connection
- ICSP header
36 connections:
- 36 GP-I/O
- 12 bit A/D converter
- Segment LCD Drive
- Serial Communication
- PWM supported
Other things:
- Price: €20.00 + VAT
Other things:
- Price: €4.00 + VAT
If I my post some corrections...
The Uno and the cy8kit are both "modules" rather than "microcontrollers."
The CM0 CPU on the cy8kit is 32bits.
They each have similar "usb connections."
32k of code space for an ARM, using "typical" libraries, is "not very much." that's mostly because the "typical libraries" were designed for larger chips.
32k of code space for an AVR, using typical libraries, is "pretty big." That's because it's a late model of a product line where chips had 1 to 8k, for a long time.
The prices you are comparing are essentially a "retail hobbyist price" vs a "vendor subsidized sample", so they don't really mean much. They're both ~$3 microcontroller chips when bought in chip form from reputable dealers.
If your professor says "Arduino is junk" and "you should use the cy8kit", then you should certainly use the cy8kit. That doesn't mean you can't prototype ideas on an Arduino.
Learning to use the Cypress development environment for the cy8kit, and programming it at the "bare" level without a bunch of pre-written libraries, will teach you many more "marketable skills" than using the Arduino environment. That might be part of the point of the class.
If you used an arduino before, it would be educational to use something else. The goal isn't really to make a power supply as quickly as possible, is it?
I disagree we learn more "marketable skills" by using the cy8kit than the arduino..
I totaly agree! As an engineer you need to be flexible and be able to work with things you don't like or don't know yet...Agree. Best is to suck it up, and use what they tell you to use.
I disagree we learn more "marketable skills" by using the cy8kit than the arduino..In this case, I mostly meant that the Cypress IDE for cy8kit is more typical of "professional IDEs", and you'll learn a lot about "how to use a professional IDE" that you wouldn't learn by using the simplified "Arduino IDE." (and if you've never used a professional IDE, you might also have some observations about why the Arduino IDE has been left "SO brain dead.")
The professor said we needed to use the cy8ckit-049-42xx, with the reason that it's a quite nice microcontroller and easy to program...
So far it looks like you can get started with hardware, IDE, and debugger for $4.00. Am I missing some $$ ?I don't think that the $4 board does debugging. It has a usb/serial converter and a serial bootloader (rather like arduino), but not an actual debug interface.
Hey EEVbloggers!
I'm an engineering student, and I had a discussion with one of my professors about different microcontrollers...
So last year, I had to make a working DC-engine, starting with only 2 magnets and an inductor, and everything needed to be powered from a microcontroller.
For that job, an easy Arduino Uno did the work, everything worked fine, 1000 rpm at only 5V with constant current of 75mA, could lift 3 kg (=6.6 lbs) without a problem.
This year, I need to make a power supply, an audio amplifier (class AB) and a constant current load all in 1 single machine, driven by a single microcontroller.
The professor said we needed to use the cy8ckit-049-42xx, with the reason that it's a quite nice microcontroller and easy to program...
The next week, I had a question, when I asked it at the professor, at one point I said: "For testing my code, I used a simple Arduino to try it out", and the professor answered that Arduino is trash!
So now... If you have something to make with a microcontroller (in general), which controller would you choose? The biggest, most powerfull one? Or would you look at only what you need?
Just some quick numbers: :blah:
Other things:
- Price: €20.00 + VAT
- Link to site (https://www.arduino.cc/en/Main/ArduinoBoardUno)
Other things:
- Price: €4.00 + VAT
- Link to site (http://www.cypress.com/products/32-bit-arm-cortex-m0-psoc-4200-programmable-digital)
The following microcontrollers are based on the Cortex-M3 core:
Did it really take 17 posts before anyone pointed out that the ARM is 32bit?
I honestly feel bad for the poor souls devoting a second of their lives to learning PICs.
if you have to replace some obsolete TTL and you only need 8 or 14pins a pic does just fine.
not every job needs complex code - sometimes you just need a handfull of pins with some logic between them.
different tools for different jobs.
>QuoteI need to make a power supply, an audio amplifier (class AB) and a constant current load all in 1 single machine, driven by a single microcontroller.
I might argue with you on the usefulness of Arduino (which at least would be C), but instead I think I'll say that prototyping a project in javascript in a web browser isn't necessarily a horrible idea, depending on where in your project the complexity lies. DSP-like algorithms might be good candidates (are these DSP-like problems, or do they involve interfacing to specialized external hardware? I can't tell...)QuotePrototyping on Arduino is a useless endeavor, it isn't in any way close to your target platform. You might as well program your project in javascript and run it on your IE browser for all that you will gain trying to prototype your project on an Arduino.
Certainly NOT! First of all, the recommended chip has a Cortex-M0 core, which is ARMv6m. Secondly, it seems pretty common to teach/use ARM chips in C without spending much time on the architecture or instruction set (because of those nasty differences between ARMv6, ARMv6-M, and ARMv7-M, and ARMv7E-M.) The "integrated devices" are probably important, though...QuoteYou should primarily be trying to learn about the ARMv7-M architecture (same for the Cortex-M3, Cortex-M4, and Cortex-M7); ARM instructions set; all of the integrated devices; memory; interrupts; etc...
He said "professor", whose advice I'd take quite differently than a "lab manager"... :-)Quotebecause your lab manager said to
Certainly NOT! First of all, the recommended chip has a Cortex-M0 core, which is ARMv6m. Secondly, it seems pretty common to teach/use ARM chips in C without spending much time on the architecture or instruction set (because of those nasty differences between ARMv6, ARMv6-M, and ARMv7-M, and ARMv7E-M.) The "integrated devices" are probably important, though...