Prepare to rumble! [Thierry] made exactly the same Hello-World style
(Now technically
! ) See how the experience is.
However, it is not only an LED blinker. He added a light detection function to enable it only at night. It uses Forest Mims techniques to reverse bias the LED and waits for it to release its internal capacitance. However, the point is that it allows the chip to do something, not just sleep.
Although Thierry is habitually an AVR user, he still prefers PIC because it consumes less power when idling, awake and doing some calculations. This is mainly because the PIC has an on-board low-power oscillator that allows it to operate at a speed of 32 kHz, and also because the chip's power consumption is generally low. Finally, this may be 10% higher than PIC power consumption.
If you have the ability to use one of the two chips instead of the other, his two versions of the same code will be an excellent way to familiarize you with the other. We really like him
This feature can take full advantage of the sleep mode on both chips during LED discharge. To be honest, at this level, the codes of the two are similar rather than different.
(Oh, did you notice that [Thierry] uses a paper clip as a button battery holder? This is a hack!)
Surprisingly, we managed to avoid the bullets left over in the occasional crossfire between PIC and AVR enthusiasts. We have
, Despite being similarly close, PIC also won this round. Will Microchip's purchase of Atmel products calm the flames? Let's find it in the comments section. We are ready for popcorn!
Waiting for MSP430 in this battle!
Why is it (supposedly) super power-saving one of the ARM chips better than 8-bit while we use it? (Probably something based on M0+)
Technically speaking, the 16-bit MSP430 will also be better than 8-bit.
Yes
+1: Low power consumption is one of the best features of MSP430. I can't wait to know how it will be with AVR and PIC. Or should I say, if thrift is the name of the game, how will they compete with it...
Compare it with the sleep current of PIC12F629.
Check out the parameter D020 in the data sheet.
OTOH can use the commonly used GCC C compiler to develop for MSP and AVR. The compiler is FLOSS/Linux friendly, is quite good in code optimization, and can compile "commonly used" C code, so if it is not part of C++ , You can use advanced C99 function Arduino yes. Needless to say, it is more interesting than the completely clumsy PIC devtools, and if you want to buy millions of units, saving a lot of price is the only problem. This is not about DIY/HACK at all, saving $0.1 with additional development time is not worth it at all.
My biggest impression of MSP430 is that the proprietary gdbproxy program binary file needs to use gdb to communicate with the device via JTAG. I remember it only works on Windows.
The situation may have changed now, but since then I have been reluctant to approach MSP430, especially because ARM chips seem to be able to do more or even more things.
4RedHatter: IIRC should have open source debugging tools for MSP and GDB interfaces recently. Although I haven't used MSP430 for a while, I am not a big fan of hardware debugging at TBH. But nowadays, because OpenOCD has gained a certain appeal, hardware debugging under Linux has been greatly improved (for me, OpenOCD is still a valuable tool, such as JTAG removal for SOHO routers and the like).
As for MSP430, I did not really understand their point of view. Of course, they are excellent in terms of power consumption, but in the end, I really care about the battery power, which depends on the radio RX/TX time, not the power of the microcontroller. Therefore, I have no problems with STM32 (especially STM32L series). In a certain way, 32-bit things may have moderate power requirements. Maybe it is not unprecedented, but its real 32-bit has a good cpu core, many superb peripherals and a more common ARM architecture, and various tools around it can better support it. These days, I really don’t know about the 16-bit proprietary architecture. MSP is not bad. Only for some very niche markets, which are relatively unpopular these days, now there are only 16 bits, which means there is no way to expand in an elegant way. Not to mention 16-bit suxx, etc.
"Arduino by ATTiny"
I am not surprised by the results.
Well... after studying the code, arduino seems to be just a programmer.
There is nothing wrong with Arduino.
I currently have an "Arduino" powered ATTiny5 (yes, 6-pin Tiny5, not Tinyx5) on my desk, which has amazing 32 bytes of RAM and 512 bytes of Flash...and there is enough space to do it Some useful things.... Frankly speaking, I used my own ATTinyCore branch, and in the process I did some work to optimize it.
Just because something is "Arduino" doesn't mean it will automatically swell or starve.
I am second. I use Arduino as an IDE for many things. I use ATTiny84 to drive a two-line LCD display into an "LCD backpack".
I did this mainly because I was lazy to reconnect the LiquidCrystal library to run independently, but still.
Hmm... compared the old "regular" equipment with the new "ultra-high low-power optimized" equipment.
Anyway, if you add a prescaler and turn the clock down a bit, I will be curious about the tiny burn. The maximum is 256? That would be 500Hz operation.
Not necessarily better.
At a lower clock frequency, compared to a higher clock frequency, the CPU stays awake for longer and can complete the same work.
This means that unproductive leakage current will also flow for a longer time.
Generally, it is best to let the kernel run at a higher speed, but for a shorter time than other methods.
Yes, I understand this is very curious, why the author of the test did not do this, at least in some aspects a 1:1 comparison.
I have used paper clips as cheap button battery boxes for many small projects and hacking activities-they work very well.
(I hope this is the correct way to post pictures here...)
Very good, I never thought you could solder paper clips.
Me too, until I run out. Oh, get it out, everything is fine. works.
Some of them. Some paper clips are enamel-coated, so you obviously want to avoid using them.
And staples. Also common galvanized hardware, such as nuts. Most things are solderable, especially when supplemented with flux.
…_.PNG
PIC is better than AVR to some extent, except that there is no easy way to program in a high-level language without spending a lot of money. It is better than AVR. If the microchip can be AVR-friendly (free) like arduino, then it won't have any discussion. By the time the microchip realizes and buys atmel, ARM has performed very well, if not, it will eventually make the 8-bit microchip not worth your time.
Because you invested it in time...that is what makes 8-bit microcontrollers worthwhile in many places. They are easier to operate and learn, so it takes less time to complete the work. Of course, there are many factors at play... There are more new devices: the ultra-simple ARM, with almost no peripherals comparable to 8-bit microcontrollers. 8-bit microcontroller with ultra-complex peripherals. and many more…
You can use the open source SDCC to program the PIC in C language. The uIP TCP stack has been ported to SDCC on the PIC.
Like I said, there are some simple things... The simplicity of Arduino is probably not in the same universe.
what
you can. Unfortunately, the goal of PIC is not so perfect. For example, if a local static variable is not initialized properly, you will not receive any warnings or any other information, and you need to use global variables (which really got me stuck). The code generation is not very good either.
SDCC is great, as far as I know, it is the only free (if free) C compiler for PIC. I just hope things will continue.
Shelling cash? The PIC tool chain is free. It is true that certain optimizations have been disabled, but you can program in C for free.
You mean, if you don’t pay, the code will be swollen on purpose
Non-optimized means that it will convert from C to asm in a ratio of approximately 1:1. In the background, the compiler can do many tricks to make your program run faster or take up less space. If you don't pay, these tricks will be disabled.
>Pull out cash? The PIC tool chain is free.
But it can only be used in Windows IIRC, which is almost inconvenient for developers and similar personnel. Linux is better for developers and advanced users. If you want to call the "Automation Core" or "IoT Center" or "Gateway", Linux will also have a lot of advantages, which is useful for using small-scale devices like Pi and Linux. ARM SBC is very convenient to implement, so high-level PC-level networks may encounter low-level microcontrollers, etc., and finally merge the two worlds. This is how the IoT function starts.
Not to mention that learning "free" microchip products is 100% vendor locked, and the knowledge gained will be rarely used elsewhere, because other architectures are completely different, and their tool chains cannot really support other functions. Therefore, people fall into the on-foot arch and have to spend a lot of energy using other things, learning brand new tool chains and completely different arches. Said, Cortex M things usually use the peripheral abstract library "CMSIS", when it comes to code rewriting, the library can be moderately migrated to other MCU vendors.
Pooh. I used to use 16F series PIC. Once I needed more RAM, I found out that if I want to avoid the storage area switching abnormality, I must use an external RAM chip. For the price of PIC + RAM, I can buy an AVR that includes all of them.
I don't think 8-bit MCU will disappear anytime soon. They are still the highest selling.
On the one hand, there are traditional products that can support, and secondly, when designing for mass production, I think the cheapest 32-bit ARM MCU can compete with the cheapest 8-bit. The engineer will consider meeting the demand at the lowest cost. If 8-bit can be cheaper than 32-bit ARM M0, then he will choose 8-bit.
I kind of agree with you. But looking at how they started to make very simple arms (think of STM32F031), it may be that they will be able to attract people and familiarize themselves with the environment.
You have not seen the PIC series IDE that Microchip can provide. For the 8-bit, 16-bit and 32-bit Microchip PIC lines of the IDE, there is a free C compiler. It even includes a complete C environment different from the Arduino IDE, so you can perform operations like "#include stdio.h" and then use printf and friends. By the way, before they bought Atmel, it was added to Microchip IDE.
The last time I used 8-bit MCU in a professional environment was more than 10 years ago (cypress ezusb stuff)
They walked along the dodo. Even if they are still large, they mainly come from traditional low-cost outsourcing projects.
If you are a student/young engineer, don't waste time on 8/16 bits, even on trolls like PIC vs AVR, this is a thing of the past.
I also made a built-in pcb battery holder using more parts of the paperclip :-)
Top surface:
From the bottom:
Although it is doubtful from a mass production point of view, I absolutely *like* such a full-board implementation design. Looks great!
Also like other components of through-pcb!
Ah, so beautiful. well done! !
awesome
If you want to arrange the layout of the PCB, why not use a suitable battery holder?
What material is the paper clip made of?
What material is the surface of the battery made of?
When these two meet and you energize through their connection, what happens in a continuously high humidity environment?
Paper clips do not have the flexibility required for this job. Put the equipment in the environmental chamber and recycle it.
In other words, your husband is very smart!
Paper clip: steel; battery: (stainless steel) steel.
But anyway: maintaining high (condensing) humidity around the coin cell is not a good idea. The distance between the shell (+) and (-)-poles is very small, resulting in very fast creep and corrosion. Current is not a problem, but a permanent potential difference (voltage) of 3V is a problem.
Low elasticity may become a problem.
As shown in the "bottom" photo, misaligned units will short the positive and negative terminals against the edge of the paper clip. If the coin cell battery is turned over, this will not be a problem.
Ridiculously simplistic. I like PICs because they have a more complete set of random integrated peripherals, but this is difficult to measure in a single competition (although I think you have implemented it in a 32kHz oscillator).
I never use more than two or three in each project, but I use different sets for each project, so PIC wins on average. Plus AVR users are bad engineers-see arduino. Haha! sad.
true?
I mean, he did switch to PIC recently, but...yes, anyone who says that AVR is only used by bad engineers needs to talk to Professor Land.
Real engineers do not use compilers unless they have 32 bits
Don't gather everyone together. What I want to say is that even if you can have the same uC, you should distinguish between arduino users and avr users. There are many people who use AVR for excellent work without using arduino nonsense.
When someone designs products based on the ATtiny platform (and AVR-C), I humbly agree with this statement.
Attempting to derail the PIC was too obvious, and this caused the discussion to fall into the AVR = Arduino fire. It's too obvious.
Now let's compare pic24 series and avr
Is 128kHz really the slowest running speed of ATtiny? With the correct fuse settings (watchdog oscillator clock, CKDIV8 fuse position 1), is it impossible to run it at 16kHz? Whether this really reduces total electricity consumption is another question.
I started from the day with pictures-without even interruption. As they grow, they are very loyal to their customers, enabling them to easily upgrade chips and backport existing code. Almost no one had a free compiler at the time, and atmel was "Who is that?". This is a good standalone picture, an 8051, or something more complicated and expensive. With the growth of pictures, really fancy peripherals have become the magic weapon for many embedded designs I have done for Telco and other companies. You can even use digital I/O as an analog gate (short-circuit or not short-circuit the signal to ground-and extremely low ground bounce noise), or Schmitt trigger input and very few capacitors (capacitors and FETs) without built-in Analog/digital converter for digital chip.
There are a wide variety of compilers, from CCS ($35 at the time, not satisfactory at the time, but working now, now at $300, which is very good) to HiTech-it was about $1,000 at the time and may often beat experienced ASM programmers , Which later appeared in Microchip’s $300 product, it was really attractive (I even tried to make money back from DigiKey), and it didn’t even handle interrupts or save temporary variables-it just copied their application notes and eventually copied them to CCS The new expensive version works well, or I ended up using it with hockey (we have done that with very little taste, all of which worked).
But the advent of Arduino changed this. I no longer design for more than 100,000 products. Just to meet a cheap Chinese Ard clone, you have to make a joke. Compared with the best IDE, the IDE is bad, but it works, and all the good code (CCS also has some good libs, not so comprehensive) and the community... there is no competition at all.
For most of my entire career, I tried to persuade various large companies, Microchip, TI and FPGA manufacturers, to insist that their tool set should be the cost center, but the success achieved was limited. I pointed out that as a designer, I am sometimes unwilling to pay more than $10,000 for the "privilege" of designing DSP or FPGA as a customer's product.
Some of them did it, some did not, at least some development boards came out, but they were still priced at "cost center". These idiots don't realize that what a university laboratory that is always financially challenged can afford is the things that will be designed into the main product after the child graduates. Some failed due to my shortsightedness.
It's not that some of us didn't set an example (no, I don't do this anymore, but this is from the overpriced basic stamps, and it's much better):
The part number should be more or less dated. I no longer maintain this particular site.
Looks familiar, anyone?
I like projects like this. When used with paper clips, it is also nice to build it on a general-purpose breakout board. In short, it warms my heart.
The interesting thing is whether you can further increase the power usage, set pull-up resistors on unused pins, adjust clock settings, etc. Of course, LEDs will drown out micro power consumption, but obviously this is not the focus of the project.
It will also be interesting to compare ATtiny10 with PIC10F. Hope they can further improve power efficiency and "fly to the moon" in the style of 1 uA Dave Jones (EEVblog).
The battle between PIC and AVR is so in the 90s. Perhaps the best is the early 00s. How about STM32 vs TIVAC / MSP432 vs ATSAMD vs AVR32 vs PIC32?
I think it should be more like STM32 vs LPC vs *add other ARM brands*
Currently, STM seems to be winning this battle due to the availability of easy-to-use open source tools (ac6).
You can add NXP Kinetis because they acquired Freescale, and Kinetis is very strong in the industrial market (but few amateurs).
I hope people understand the functions of integrated peripherals.
There are too many high-level language programmers on this site. Code is their hammer. The molar speed is fast, the molar memory is good, and the molar effect is better.
I recently redesigned a customer circuit, from a four-channel PWM motor controller controlled by its 100MIPS software to a 4MIPS 8-bit PIC using its integrated module. I can even add a lot of things that the previous controller could not handle because it was too tiring.
I did something similar last year. Previous engineers tried to measure two fast pulses by simply polling the input using a very fast processor. I used the PICs capture comparison module instead of the code, so I was able to eliminate the two ~$5 processors on the board. This alone reduces the BOM cost by 50%, but because it consumes much less power, takes up less space, and requires fewer supporting components, etc.... The final BOM cost is reduced by 80%.
I am second.
The newer analog peripherals in PIC are hard to beat. You can now use them to build a complex SMPS or LED driver.
There is no doubt that peripheral equipment is very important. I agree...the newer analog peripherals on the PIC are very surprising.
Now, if only Microchip can release CPU cores worth the damn...come with these amazing super duper peripherals...and provide a decent, unrestricted open source compiler... dream
Yes, the PIC peripherals are great, well thought out, and have some amazing features. But I agree, the CPU core is very powerful.
A previous poster said that the compiler is "free," but only if you use a compiler that "deliberately adds" garbage bloated code. For anyone reading the output ASM, it will only make your blood boil so obvious and deliberately. IMO is just a (mouldy) carrot that attracts users to pay.
Maybe Microchip now owns PIC peripherals at the same time and pushes them onto the Atmel CPU core? Atmel cores are much better than PIC cores, but not as good as some. At least doing so would be a step in the right direction.
Does AVR-gcc support chips with Avr core and pic-periferals? It must be feasible now, right?
I agree very much overall. PIC peripherals are very complete and hard to beat. Although the core was once outdated, I found myself often attracted to PIC.
Having said that, I have been following the new ATtiny817 series. The peripherals are not exactly the same as the PIC16, but they are still impressive (most notably, it lacks peripheral pin selection, which is unfortunate). Maybe it heralds the emergence of more beautiful things?
Lol, LED/Bucks/Boosts/SEPIC controlled by software is nothing new.
Say, watch
These crazy Russians. What do you see on the homepage? Only use AtTiny's full software BUCK circuit. The thread has a history of 2.5 years, and as of 2014, the circuit is not completely new. Before that, there were almost no SEPIC and buck drives. Some smartass thought of using TS5A3159 (1-ohm analog switch) as a low-voltage "FET driver" and IRLHM630 (40Amp in the compact PowerQFN) FET to achieve more efficient power conversion in the "final" custom torch. The circuit mentioned is a "simplified" version using the IRLHS6342 FET. Although the drive frequency is high, it can "only" provide 8/19Amp current, but the gate charge is much lower, so it can pass through the microcontroller port" Direct drive". This is how people get a multi-mode, efficient, and full software SEPIC / BUCK / BOOST. Note that they have inserted their buck coil into the so-called "ground" rail to be able to use N-FET and "direct drive" instead of (inherently worse) P-FET :)
For completeness, for those weird ppl who want to play with fire and use a software-defined approach to invade the world:
The way to achieve a super-efficient, ultra-compact, multi-mode BOOST converter (for the most advanced LED flashlight) using only Tiny 85:
(Unfortunately, only a few places can still understand 8-bit).
The notification scheme itself is very simple: take a look at Wikipedia, replace the abstract switch with N-fet, this is the software and excellent component selection and the clever cracking of the TS5A as a "low-voltage FET driver", which shakes this thing up. This interesting thread also showcases a hard-core DIY version of a very advanced PCB and a "proper" version of the same circuit manufactured in the factory. Yes, the best DIY does not care about QFN, and can finally submit its board to the fab for mass production. This is how DIY becomes an engineer.
Yes, it can be done, but that does not mean it is the best. Microcontroller switchers are not particularly high-performance, because ADC/processing speed/PWM is the bottleneck of overall bandwidth/switching frequency. Jitter in the control loop can affect regulation.
Today, you can get switches with on-chip switches with a PWM frequency of 1.5MHz. You can get very small inductors, use only ceramic capacitors, and have very fast transient response when running at SMPS at those frequencies.
>Yes, it can be done, but that does not mean it is optimal.
These solutions use 250kHz, 2.2uH coils, epic PMEG diodes, and 100uF cercaps. Reduce the pressure to an efficiency of more than 95%, or increase by more than 90%. Task-specific "cheating" in "buck": Once the battery is exhausted to D = 100%, the switch stops and the FET is fully opened. The efficiency reaches 99%. However, the LED will never exceed the rated current, because this trick only occurs on a depleted battery, which cannot exceed the limit.
These guys are obsessed with efficiency. The flashlight also implies a narrow space. They make circuits for themselves, trying to get most of it (fun), so they can afford the final components and designs. Some designs use multiple Schottkys in parallel to further improve efficiency and/or current handling capabilities. Not to mention that they have spent a lot of time making it as small as possible. Some of them managed to fit it with 15mm flashlights.
By the way, have you noticed that these crazy guys are using IRLHM620? Feel free to use Google PDF. This thing is epic, 40A FET in QFN. Yes, they solder QFNs and use direct toner transfer for prototype batch processing (sometimes they also roll out real batch processing in nearby factories). Hello breadboard lovers :-).
> Very small inductors can be obtained using only ceramic caps
Since their task is assumed to be small, they are forced to do exactly the same thing. Therefore, they put a lot of effort into optimizing the selection of parts. They have ideas about handover failure vs
> And it has very fast transient response when running SMPS at those frequencies.
OTOH 1.5MHz high current circuit has very high requirements on PCB wiring. Even 250kHz will not consume too much power: if the MCU is placed too close to the coil, it will immediately hang. By the way, you understand that they are performing 4-5 different currents according to the user's choice, right? Dare to show 5 different modes on 1.5MHz SMPS? This special set of circuits cannot handle fast transients: battery discharge is a slow process. If someone cares about fast transients, they should check it twice to ensure that the MCU can meet the requirements. However, if someone signs up for SMPS, they must learn something. Otherwise they are destined to face a lot of trouble. Sorry to inform breadboard lovers, but you cannot do real SMPS on breadboards. Even at 100kHz will be a disaster. By the way, these people are concerned about Rds and computer conductance and switching losses. It is recommended to use the low-power version of the IRLHS6242 FET replacement circuit. The Rds_on of 620 is final, but the gate charge is high. The gate charge of OTOH IRLHS6242 is so low and the switching curve is so steep that uC can drive it directly through GPIO without the TS5A "gate driver". It only costs a few percent of efficiency, and 6242 can handle less current, while Rds_on is higher.
If people need fast data transfers without making the CPU core busy, then just defeat the peripherals that support DMA. The only advantage of AVR over STM32 is that the timing is more predictable/less jitter, which is enough to enable one to realize USB low speed 1.5Mbps in pure software. STM32 will not do this, but it can do more feasible things.
Not to mention that even STM32 ICs priced at $1 have a powerful timer, and at least one of them also drives a true three-phase PWM, can automatically insert dead zones, and so on. Guess what this means for motor control. Overall, STM32 timers are cool. Even for a $1 IC, there are many fast and advanced peripherals that beat PIC and AVR. When it comes to DIY, waste disposal like PIC is really not the best choice, unless someone really plans to make 100 million devices, so the horror of PIC development can recover the cost.
At current prices, superb cpu cores and final peripherals prices, 32-bit MCUs will show people who is the king of these 8-bit products, and the 8-bit market has already squeezed 32-bit M0 / M3;)
I can eliminate the interrupt jitter on the STM32F030 of my VGA terminal project. I only need C code, run the code in FLASH, and don’t even need compiler instructions. IRQ triggers the video output of DMA, and even the jitter of any clock cycle will make the display chaotic. More advanced DMA (such as NXP / Freescale Kinetis) does not even need IRQ to trigger DMA.
With the advancement of peripherals, you hardly have to worry about jitter. Why bitbang when your hardware does the work for you.
Well, the last time I saw NXP uC, their flash controllers have been sullen, asking people to call their clumsy api code to write to the flash, and the api has a lot of strange requirements. I don't know if they will get rid of this terrible nonsense in the future uC, but I am already very afraid not to touch the 10' NXP in the next 10 years. STM somehow made this part more to my taste.
As for bitbang, it might be interesting to understand the protocol and how things work, etc. If that is part of the plan. Otherwise, it will delay development for no reason. Regardless, when it comes to DIY, there is no need to save a few cents on parts. Even in real mass production, cost optimization is only meaningful for real mass production, because the benefits of lowering prices cover these tasks. It’s not epic to save $5 by spending 10 hours of extra work? In this case, the only acceptable thing is the failure of project management.
Just like in some Youtube Videoblog (I'm not sure if this is EEVBlog or something similar). This guy cracked a digital scale with an SPI interface between ADC and CPU. Ha has been talking about how fast this is (2 or 3 digital kHz range) for quite a long time, and it is not possible to capture EN and CLK by polling :-) His solution is to use an 8- or 9-core parallax propeller board. Instead, the SPI port in slave port mode is used, which has a history of decades even on the old 8051.
Just as the only tool you know is a hammer, every problem is like a nail. If not, a bigger hammer is needed. :-)
All these comments make it clear that the code is their heavy hammer.
Since they are actually the same company, it is great to see that the ATMega328 series has added features such as 12-bit ADC, dual UART and better peripheral pin selection, and of course the advantages that PIC has always had.
Take a look at the XMega series.
XMEGA32E5. lovely!
However, at the same price, you can get SAMD21E with 128K code. What is missing is the dual 12-bit DAC.
Sorry to inform Atmel, but when it comes to 32-bit and featured UC, they suck. STM32 got a good 12-bit DAC and ADC in the fairly cheap STM32F100. XMEGA is meaningless. Atmel's own proprietary 32-bit UC failed. They started Cortex M really slowly, so their peripherals still couldn't match their competitors. Atmel's A series cortex and M series MCUs are indeed not competitive. China's SoC defeated Atmel in the field of A series, STM / NXP and many other little-known suppliers (such as EnergyMicro, etc.), and attaches great importance to the M series.
It depends on what you are looking for. Comparing the 128k version of STM32F100 with SAMD21, their prices are roughly the same* (ST's price is much lower), ST has more materials, is faster, but is less energy efficient. I can't say that I have been won by ST's L series products, which are 50% more expensive than SAM, have the same performance, and are full of extras.
For me, as a hobby, due to the lack of higher performance, energy efficiency and familiarity with good IDEs, I cannot use xmega and SAM. However, according to my needs, I can put in a nucleus and some mbed.
*I am checking the price of a large local distributor. You can change the balance anywhere on earth. Not counted as fake Chinese garbage.
This kind of "energy saving" marketing BS is annoying. If my uC is in sleep state most of the time in most cases, and in any case, for example, RF RX / TX consumes most of the power, why should I care about it? All these interesting stories about super power efficiency are very interesting. But I have no major problems with STM32. By the way, they have STM32L, which can perform more demanding low-power tasks. The whole STM32 is very good because it can be expanded. They have a wide range, from the cheapest parts to the manufacture of 8-bit products, all competing with price, and high-end parts can even boot Linux (someone has promised support for some STM32 mainline kernels). Atmel? Okay, it's cool, GL migrated from the megabit to SAMD. Do they have the same peripherals that you are familiar with? Do they have comparable portfolios of comparable size? Otherwise you will become difficult? What's more, Atmel hasn't paid attention to CortexM for too long. I can't wait for every obstacle on this planet. If atmel gives an "underestimation" to power efficiency, then they should really look at their A series products instead of clumsy marketing. In terms of power efficiency, this undoubtedly requires some love. When it comes to Cortex A, is it really shameful that a $5 Chinese SoC like Allwinner and Rockchip beat atmel? In terms of price, performance, peripherals and performance per watt. No, they are not "counterfeit products". Atmel is more likely to resort to the production of Chinese IC clones. I regret to inform Atmel, but these days they do have quite a few competitors, and the competition is not fierce. Megas/xmegas are very expensive, but completely outdated, and the cortex-M from atmel is not epic.
@LinuxDude You are wrong about saving energy and becoming a BS. Check the standby current and running current in the data sheet by yourself. The situation is several times worse (perhaps many times), and it doesn't work. This cannot be ignored in battery-powered systems.
However, you are correct in most other things. Yes, atmel's product portfolio cannot be as good as ST, but this is not necessarily a bad thing. For many reasons, I don't need a 1K micro card to have the same ADC as a powerful 32-bit cortex processor.
I can't really comment on Atmel, because I have basically never used them.
I just want to inform you that EnergyMicro is dead, it has been acquired by Silicon Labs, and they have retained the EFM32 series and the names of these geckos.
We usually make quick cross-competitive comparisons between the larger Cortex-M manufacturers. But so far, we have always found the equipment suitable for the task in the ST catalog, so we insist on using it, because it is easier for FW-Dev to be with the same supplier, his library and tool chain. Now, our products range from L100 to F100, F200, F400 and even F700.
One thing can be said with certainty...In terms of microcontrollers, we now have tons of options. Although this is usually good, it means that people have to do more research/investigation to find the parts that best suit their needs. Personally, I like STM32F072/42, STM32F103 and STM32F411 parts. I can use the STM32Cube HAL library with all 4 parts and the port code between these parts, it is amazing!
I must also admit that the peripherals on the STM32 are completely useless, and in many cases can be said to be better than anything on the PIC. LinuxDude only mentioned DMA in the previous comments, which is complete nonsense. In addition to ADCs that can reach 2.4MSPS on STM32F4 and 5MSPS on F3, they also have powerful built-in flexibility such as injection channels, analog watchdogs and more functions. The timer is also great. UART and their fractional baud rate generator (F4). Part of what makes STM32 a bit daunting is the complexity of the peripherals. But complexity is the price of having such powerful peripherals.
You can also get the stm32F1 nano-shaped board (called bluepill) from aliexpress for $2, and ST-LINK from the same site for $2. Things really won't be much cheaper than this.
I didn't really use EnergyMicro, just evaluated some of their tasks. So I have not traced their fate. However, this seems to explain why I have seen SILabs ARM in some devices in recent days.
I also like the STM32 product portfolio. Reasonable and complete, without major defects and shortcomings. If they insist on using STM32, they can do what most microcontrollers should do. Maybe they are not the best in all aspects. But they quickly introduced Cortex M and managed to do it in a reasonable way, while certainly "good enough" for most tasks. Unlike Atmel, which has been behind trying to launch its own proprietary 32-bit products, while selling expensive but terrible atmegas. Atmel said that I have had enough. As far as I know, Atmel has not recovered from these strange decisions.
Like many people, I started with the classic microcontroller pic16F84. I created an rs232 programmer that I found in Eloktor magazine. This is indeed very primitive, slow and error-prone, especially in Windows 98. It can only program a few devices. Mplab x with xc has come a long way, and using pickit 3 programmers can program all available pictures and future equipment. Hit F6 to compile and program with one click. A separate hexadecimal programmer is no longer needed, and you do not need to reload the hex file after every change and recompilation.
Usability has also been greatly improved. At the beginning of this century, only the most popular photos were available, not atmels. Now I can choose any picture in the selection guide and order from my local supplier.
Over the years, I have used many peripherals in these photos and left a deep impression on them, that is, how much work they offload from the cpu can almost be regarded as a coprocessor. Especially on pic24 and pic32, such as automatic ADC capture and conversion. Certain things cannot be achieved using bit tapping, such as using the ctmu module to measure in the sub-nanosecond range or capturing fast logic timing on a floppy disk drive. The comparator can be used as a trigger for the ADC to automatically start sampling, effectively making it a digital oscilloscope. Manual triggering causes the oscilloscope track to lose synchronization and jump around.
I only use atmel chips for programming in arduinos and arduino studios. How impressive it is to set up and run it, but in a way, I prefer to use photos in my projects. I think I am more familiar with the image tool chain. It will take a lot of time to reach the same level. Indeed, the 8-bit image of flash memory is very low, but pic24 and pic32 are good choices. Generally, if there is insufficient memory, you must use compiler optimization, manually optimize the code or avoid libraries that take up a lot of memory. Especially printf and float usage can fill up 4k devices immediately. These are usually unnecessary, and the original replacement function usually does the job well.
Microchip seems to have recently released a new PIC32 series PIC32MM. The competition with arm cortex m0 is fierce. The clock frequency of PIC32MM is 3.17Coremark/Mhz, while the clock frequency of Cortex-m0 is 2.49.
Another PIC32MK series is also being released....... But there is very little information about the series.
The next free tool chain.
In any case, if you are not new to microcontrollers, STM32 is a victory! ! !
1) The price of low-end ICs may be as low as $1 or less. I didn't even get a volume price discount from the supplier, and bought 30 PCS at a time. Yes, this is for Cortex M3 (I'm really lucky with this deal).
2) Different exquisite packaging, such as TSOP-20 for low-density items, if more pins are needed, then classified as TQFP; for small but distinctive things, use QFN; People who put it into use even include CSP/BGA which is on the edge of technology. That is to say, if the advanced hobbysys knows how to do "direct toner transfer" correctly, then they can handle TQFP or even QFN:P. In this way, people can etch very interesting equipment on their kitchen.
3) Sophisticated peripheral equipment can be set according to your needs. Said it can do DMA. Imagine that the CPU and peripherals are running in parallel, and most of the data movement nonsense is offloaded from the CPU. So it can do more things.
4) Reasonable devtools. Including open source. Therefore, these applications can be developed, such as running Linux. Just like the usual gcc, OpenOCD also provides support for this. If someone is a fan of hardware debuggers, then cheap FTDI2232/4232 converters can be used for hardware debugging, and dozens of them can be easily integrated with OpenOCD use together. Now, you can perform high-profile hardware debugging for less than $20. For more than $100, there is no need to buy expensive proprietary tools.
5) A large number of libraries, off-the-shelf firmware, examples...-Nowadays, Cortex M is indeed very popular. There are good reasons!
6) Only use the built-in bootloader of ordinary UART. So you can use any 3.3V UART/TTL cable to blink it. Say, Atmel lacks it. Therefore, flashing an empty Atmel requires a "hardware programmer" circuit. If, for example, one on Arduion manages to corrupt the bootloader, it cannot be repaired using only the serial line, a "hardware programming interface" is required. This is not just a UART line, so any UART cable will not work, and the required circuit is more similar to a "hardware debugger".
7) Real number 32 bits. Especially M3 will definitely play. Is there some RF communication by using NRF24 etc.? One doesn't want neighbors to fiddle with their radio-controlled things, right? Therefore, Cortex M is cool enough to run some "real" cryptocurrencies. That said, stripping the "tweetnacl" lib for public key encryption (!!!) will reduce the code to 3KiB, while the use of RAM is very small, leaving enough space for other things.
8) Unlike PIC and AVR, Cortex M is von Neumann in terms of developers and Harvard in terms of hardware, both. There is no RETLW as annoying as PIC, and there is no silly data and program memory separation like on AVR. You can run the code from RAM if needed, which is convenient if you want to update its custom bootloader, etc., for example. Or store the static data in flash memory without special processing, the compiler only needs to know the area and who is the RO/RW.
The only good thing about Atmel is Arduino, which is easy for beginners. But a bit annoying, the limited 8-bit operation is really bad mathematically, if any result processing is required, they will get very slow code, which is also great. Say, it is mentioned that striping tweetlnacl is 3KiB code in ARM, but 12KiB in AVR. Wow
The code is your hammer. Real peripherals will set you free.
Where is the hacker? Oh, there are clips. .: D: D
Please be kind and respectful to help make the comment section great. (
)
The site uses Akismet to reduce spam.
.
By using our website and services, you expressly agree to our placement of performance, functionality and advertising cookies.