Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×
Hardware Hacking Hardware

ARM Processor On a Breadboard (hackaday.com) 94

An anonymous reader writes: A normal Arduino is easy to use and cheap, but it is a reasonably slow 8-bit processor with limited memory. Why do people use them? They are simple to use and set up. Hackaday shows how to take a cheap ($6) 32-bit CPU in a breadboard-friendly package, plug in a small number of parts (resistors, LEDs, and a cable), and use an online Arduino-like IDE to program it. The chip is way more powerful than an 8-bit Arduino and the code is comparable in complexity to an Arduino sketch that does the same thing. It's an easy way to get into embedded without having to suffer through 8-bit processors. And the new Arduinos also use 32-bit ARM, so that's an option too.
This discussion has been archived. No new comments can be posted.

ARM Processor On a Breadboard

Comments Filter:
  • Teensy 3.1 (Score:5, Informative)

    by suso ( 153703 ) * on Friday October 09, 2015 @07:36PM (#50696541) Homepage Journal

    Or you just buy a Teensy 3.1 [pjrc.com] for around $20. Its a 32-bit ARM running at 72 MHz and runs Arduino code.

    • It's just another story about kids discovering that they could use small chips for the first time and then became excited the same as the day they discovered sex for the first time. Meanwhile old people are saying "slow down and take a shower, you didn't discover anything new".

      • by Anonymous Coward

        >anything new
        and greybeards/hams tend to use obsolete hardware and chant "right tool for the job" because they refuse to learn new things. same guys show up for an interview and wonder why they don't get hired.

        • Re:Teensy 3.1 (Score:5, Informative)

          by geoskd ( 321194 ) on Friday October 09, 2015 @09:19PM (#50696999)

          and greybeards/hams tend to use obsolete hardware and chant "right tool for the job" because they refuse to learn new things. same guys show up for an interview and wonder why they don't get hired.

          Us greybeards would be impressed with these things if there was anything to be impressed about. This thing is far too little far too late. for $10, you can get one of these [mouser.com].

          You young uns don't even understand enough to know what to get excited about...

          • by vovin ( 12759 )

            Please don't suggest anyone use that crap. The Cypress IDE is a hideous mindf**k.

            • So don't use it. No one seriously working in embedded systems uses the IDE or tools that come from the manufacturer.

              • by Megane ( 129182 )
                That's the problem I have with their PSoC parts. How do you control the PSoC bits without using their IDE? I suppose somewhere behind all that there's a command-line tool, but you still have to somehow create the files that specify how stuff is hooked up. I mean, PSoC is a pretty cool idea, but I'd hate to have to use it professionally when the only choice is the manufacturer's IDE.
                • You're correct; there is currently no way to configure the CPLD elements of the PSoC series without using the Cypress IDE.

                  On the other hand, the PSoC chips have some appeal even in applications where you aren't going to use any of that, because they are the only ARM microcontrollers I am familiar with that are completely 5V-friendly not merely 5V tolerant. The chip actually runs at 1.8V, but every input and output has built in level shifting so it can accept 5V inputs AND produce 5V outputs. Each 8-bit port

    • Re:Teensy 3.1 (Score:5, Insightful)

      by Tailhook ( 98486 ) on Friday October 09, 2015 @10:03PM (#50697127)

      Or you just buy a ST Nucleo [digikey.com] for around $10. It's a whole family of STM32 ARM Cortex MCUs available on the same board with Arduino Uno R3 compatible headers and every IO pin exposed.

      • This. The online mbed IDE is pretty nice too. It even allows you to export your project to Keil/IAR.
        • by Megane ( 129182 )
          I got turned on to mbed a few years ago when an NXP rep left behind a few boards after a sales meeting. I didn't care much about the Code Red based boards, but the NXP1768 was one of the first mbed boards. It changed the way I program after seeing how mbed uses C++. Nowadays I mostly use the Freescale mbed boards, and I have a couple of Teensy 3.1 boards that I'd like to get working with mbed.
      • There is a whole series of Nucleo boards now, with a choice of Cortex M0, M0+, M3, and M4 processors. And they are all under $11. Not a bad deal at all.
    • pjr is a great programmer and seems like a great guy, too.

      BUT - the code is proprietary (boot loader) and don't say that BL's don't ever get corrupted or have to be reloaded; I've seen it happen more than a few times. if the chip gets corrupted and needs reloading I'm not going to WANT to buy a new chip from paul every time.

      for one-offs its great. but the cost for the chips gets expensive when you add in his price points.

      again, he's a great programmer and his stuff is top-notch, but it comes with a cost a

      • Re:Teensy 3.1 (Score:4, Informative)

        by pjrc ( 134994 ) <paul@pjrc.com> on Saturday October 10, 2015 @07:21PM (#50700877) Homepage Journal

        Hey, that's *me*. I'm the guy who makes Teensy.

        First, thanks for the compliment. Really, the thought does count.

        Indeed dev boards like Teensy do cost more than hardware that's subsidized by semiconductor manufacturers. They also cost more than Chinese clones. Those folks don't spend anything on software development, and they deflect all tech support and even some customer service back to the name-brand websites where they copied designs. Likewise, big semiconductor companies only put significant effort into supporting engineers at major corporations who are likely to design chips into high volume products like cell phones.

        Projects like Arduino and Teensy are about helping ordinary people. We really do put effort into making things easier to use and we do respond to help individuals. We do invest a lot into software development that's aimed at allowing novices to achieve their goals. Obviously it's not possible to hand-hold everyone through every project, but the non-engineer user experience is dramatically better.

        The simple reality is that costs money, especially ongoing software development as these 32 bit chips become more advanced and people wish to utilize that power for awesome projects. Name brand boards, where sales does fund software and documentation development will always cost more.

        Software development means much more than just the tools. For example, years ago I wrote the FreqCount and FreqMeasure libraries, because all other exampls and Arduino libraries at the time has subtle timing errors. Since then, numerous people have wanted to measure 2 or 3 frequencies. Just a couple weeks ago I wrote a new FreqMeasureMulti library (released under MIT license) which uses the more advanced timers with input capture on every channel to allow simultaneously measuring up to 8 different frequencies. *That* is the type of software development which sales of boards like Teensy funds. I try very hard to keep costs low, but funding ongoing open source software development does cost something, which is necessarily reflected in the price of the hardware, since the software is all distributed for free.

        There are many "Arduino Haters" in the world, and much of their frustration seems to be based on the high retail pricing for dev boards. Indeed, if you're an experienced engineer who's capable of developing all your code from scratch on bare metal, even things like filesystems and USB & networking stacks, then the idea of paying anything extra for well tested and easy to use software probably seems utterly silly. Paired with a simplified feature-poor IDE, it's maddening. But it really takes a special lack of human connection to refuse to see how easy-to-use platforms could be valuable for less experienced people, let alone utter beginners.

        Of course, nobody uses boards like Arduino or Teensy in high volume products. Comparing costs of dev boards to the actual chips from distributors is silly. Sometimes it does make sense to embed a dev board into low-volume or pre-production units, especially if that lets you start selling and shipping sooner, but when volumes increase, of course you're not going to buy dev boards at high volume.

        Teensy does use a proprietary bootloader. That's a business decision for a small company within a large marketplace with massive Chinese cloning. It's perfectly fine to object on philosophical grounds. The market is filled with lots of alternatives, much like how you can install Debian instead of Ubuntu. But bootloader corruption isn't much of an issue. Perhaps you're unaware that 32 bit Teensy uses 2 separate chips? You can't overwrite or corrupt the bootloader on the other chip, no matter what part of the main chip you overwrite. It really is a solid design, which has proven itself in real world usage over the last 3 years, by many thousands of people of wildly varying skill levels.

        If you took the time to read all this, I hope you'll at least be able to appreciate that a tremendous amount of open source software

    • by hwstar ( 35834 )

      From what I have seen with the Teensy, is the designer is playing games to prevent clones from appearing by doing "genuine" detection in the tools. It is for this reason I have avoided the Teensy.

      ARM processors are the future for the maker/hobbyist group.

      The observations:

      1. The AVR processors are getting a bit long in the tooth and don't compare with the power of an ARM processor.
      2. The Arduino IDE is seriously lacking debug support, and its a pain to debug real time code with println statements.

  • Power usage? (Score:5, Interesting)

    by MobileTatsu-NJG ( 946591 ) on Friday October 09, 2015 @09:08PM (#50696937)

    My Arduino projects don't require the power of a 32-bit processor, but do run on batteries. How much more (... or less maybe?) power is drawn by this processor?

    • by Anonymous Coward

      Battery operation can sometimes be improved at higher clock speeds depending on the application. If the idea is sleep most of the time, but wake up and execute some code before going back to sleep, then you are going to have more flexibility with a mcu that has fine-grained control over clock speed. You need to find that intercept point where efficiency is at a maximum for the wake-time / clock speed ratio.

      • Re: (Score:3, Informative)

        by Anonymous Coward

        http://www.ganssle.com/reports/ultra-low-power-design.html
        Check 6 - Running Fast to Save Power (and actually the whole thing. Interesting, even though i currently have no need for ultra low power designs).

        • by fisted ( 2295862 )

          +1 very good read, thanks AC

          • by obsess5 ( 719497 )
            Anything by Gannsle is a good read. If I remember correctly, he used to have a long-running column in the excellent, but now-defunct Embedded Systems Programming magazine, plus he used to be based a few miles up the road from me in Maryland. (The magazine in general--and Gannsle's other writings--were/are good reads for all programmers, not just for embedded systems programmers.)
    • Re:Power usage? (Score:5, Informative)

      by subreality ( 157447 ) on Friday October 09, 2015 @10:50PM (#50697253)

      My Arduino projects don't require the power of a 32-bit processor, but do run on batteries. How much more (... or less maybe?) power is drawn by this processor?

      It's reasonably close. If you check the datasheets for "Static Characteristics" / "DC Characteristics" you'll find:

      The LPC1114FN28 (the ARM chip) draws 9ma @50 MHz, 6ua @deep-sleep, and 220na @power-down;
      The ATMEGA168PA (typical Arduino-ish AVR) draws 4.2ma @8MHz, 0.8ua @power-save, and 0.1ua @power-down.

      These numbers are just for the chips - the Arduino draws considerably more (about 40ma @idle), and you can stretch your batteries a lot by hacking it. To give a sense of scale, the power LED on an Arduino probably draws 5-10 ma just by itself.

      Note that this is a "Cortex M0" profile ARM chip - M means Microcontroller, and 0 means low-end. This is a 50 MHz chip with 32K of flash and 4K of RAM. It's more powerful than an AVR, but don't expect to boot Linux on your breadboard with this thing... that's a job for the Cortex A (Application) series.

      Source:
      http://www.nxp.com/documents/d... [nxp.com]
      http://www.atmel.com/images/At... [atmel.com]

      • Most Arduino boards run at 16 Mhz, so the power consumption will be higher. And if you want to lower the power consumption of the ARM you can reduce the clock speed. The running power use of that ARM is probably actually lower at the same clock speed than the ATMega328 but the sleep current is higher. And that NXP chip is not state of the art; a newer chip optimized for low power consumption like an STM32L0 will use even less power.

        Aside from hacks like removing the LEDs, the sketch loaded on an Arduino aff

    • Depends upon what you do. Arduino projects typically aren't used to communicate their data in a complex way. You can talk over UART but it's pretty hard to get an IP stack into there.

  • Why? (Score:5, Interesting)

    by BitZtream ( 692029 ) on Friday October 09, 2015 @09:26PM (#50697017)

    So let me be clear, I'm currently work on flight controller software (Drones) that I'm running on both AVR and ARM processors. A 72mhz ARMv6 chip ... meh, give me the AVR at 20mhz.

    Its not all about bus width or clock speed. Most AVR instructions are 1 or 2 clock cycles, a handful are 3. ARM is rarely a single clock cycle, 3 being common. From a MHZ perspective, you just practically equalized them. The ARM at 72mhz has very little advantage from a CPU perspective. Having an MMU is nice, but once you start using it, you're likely starting to eat more cycles than you have spare and you're no longer real time.

    The AVR has a fully orthogonal instruction set. Writing AVR assembly is actually enjoyable. Unlike ARM (god don't get me started on x86).

    AVR chips are durable, you're not going to find an ARM that can handle the load/voltage of an AVR. I could go on for hours.

    Of course, on that same note, I could argue for hours about why you'd want to use an ARM over an AVR.

    They don't serve the same purposes, its stupid to pretend they really compete against each other. You simply can't take full advantage of the ARM CPU and do a lot of real time work, for example. So just use an AVR for the real time bits and leave the 'business logic' to something else.

    The chip is way more powerful than an 8-bit Arduino

    No, it isn't, you're just only looking at the MHZ and not the actual real world performance. Its not bad or anything, its just barely better.

    and the code is comparable in complexity to an Arduino

    Sure, but so is any processor that has an Arduino library for it, whats your point? I can write an entire OS in one line if you want. Of course, that one line is just going to jump to some actual code that does the real work ... kind of like how Arduino sketchs are just standard C++ files which are preprocessed to include the Arduino headers and libraries.

    • by Tailhook ( 98486 )

      Fanboi much?

      The most popular flight controller around is the Naze32 with an STM32F1 ARM MCU. No one is having trouble with the instruction set, durability or any of that other stuff you're wrapped yourself around.

      Cutting edge flight controllers have moved on to ARM Cortex-M4s. That MCU provides a floating point unit for faster signal processing of gyro and accelerometer data, implementing filters and solving PID calculations at much higher speed. Cortex-M7 is a thing now; six-stage, in-order, dual-is

      • Fanboi much?

        The most popular flight controller around is the Naze32 with an STM32F1 ARM MCU. No one is having trouble with the instruction set, durability or any of that other stuff you're wrapped yourself around.

        The parent didn't have a problem either. The only real problem is your reading comprehension.

        Cutting edge flight controllers have moved on to ARM Cortex-M4s. That MCU provides a floating point unit for faster signal processing of gyro and accelerometer data, implementing filters and solving PID calculations at much higher speed.

        Define cutting edge. So far I've yet to see a fancy 32bit flight controller do something that mine can't, and mine runs on an 8bit AVR, not even configured at full clock speed. So don't tell me about your fancy multi-stage pipelines, tell me about the real world benefit because so far I've experienced none. Heck I still have a naza controller (which had a 32bit ARM from the very beginning) unused somewhere in in the

        • You need to get a clue on microcontrollers and CPU's. There are plethora of 32 bit microcontroller robots and drones available in the market. You can control a drone using a simple MSP430/MSP432 and conserve as much power as possible.
          • Fuck me your reading comprehension is as bad as the person I was replying to. I know there's 32bit ones on the market. I have one myself. Except that it performs no differently than the 8bit one I have right now.

            So until you can come up with some concrete data on real world end user benefits other than "moar bits = moar betterer" please don't try and school me. Especially if you're going to end with some quote on power usage, which is a joke given most MCU's use only a fraction of a percent of the battery i

      • Heh, I have about 12 naze boards, I'm in the commit logs for baseflight, it is EXACTLY what I'm talking about, it's not worth using over an AVR due to it being a 72mhz ARM with multi clock cycle instructions and memory wait states means it's not worth bothering over a large AVR with 0 wait state reads Due to read ahead and most instructions being single clock cycle.

        No one is doing anything special with it.

        I suggest you get a clue. The Naze software is a port of AVR software (multi wii) and it is far less p

        • Why would you want to use a full blow CPU instead of a microcontroller. ARM Cortex M are microcontroller series. Comparing a MCU and CPU is apples and oranges.
        • by Tailhook ( 98486 )

          A 72mhz ARMv6 from STmicro

          Why do you keep bringing up ARMv6? ARMv6 is a CPU architecture and uses complex caches, TLB units and a virtual MMU. I don't know of anyone trying to use these for flight controllers. The Cortex-M architecture, which is the basis for all of the common ARM based flight controllers (OpenFlight, BrainFPV, Naze, etc.), is not ARMv6. I don't think you understand what you're talking about.

          Floating point isn't actually a good thing in flight controllers, fixed point is preferred..

          PID controllers using floating point are available now in Cleanflight. Read about them here [github.com]. Other code bases, such as B

    • You'll struggle (Score:2, Insightful)

      by Anonymous Coward

      A lot of the physics doesn't lend itself to 0-255 integer values, GPS location too, really not 0-255 integer, and when you get to advanced features like camera tracking you really won't manage it.

      I think you're kidding yourself about ARM taking several cycles per instructions, its often less than 1 due to pipe-lining parallelizing operations, and more registers mean less transfers to and from memory.

      "No, it isn't, you're just only looking at the MHZ and not the actual real world performance"

      Sorry, ARM blows

      • Re: You'll struggle (Score:2, Informative)

        by Anonymous Coward

        You are a moron. 8bit computers can work with any bit length of values, as well as any data type. In particular the arduino supports 16 bit words out of the box. They put people on the moon with that kind of technology, btw. Go f* yourself.

    • by Megane ( 129182 )

      This is a Cortex-M0 chip. Cortex-M is intended for low-RAM embedded applications, so you generally won't find an MMU on them. In fact, this chip has only one or two MMU pages worth of RAM total. And they don't even run the classic ARM instruction set, they're Thumb-only, with the M3 and M4 using Thumb-2, and M0/M0+ using a Thumb-2 subset. It's Cortex-A that has an MMU and runs Linux.

      But if you want to stay ten years in the past, go ahead.

      • The guy does not know the difference between Microcontrollers and CPU's. M3 and M4 does not have an MMU and multi stage pipelines. I really don't understand how he is doing drone software without knowing the controller internals.
    • It also depends on the size of the data. If you are working mostly with 8 bit numbers and bit patterns, the 8 bit AVR will be competitive in speed with a low end ARM. If you use a lot of 16 or 32 bit numbers, the ARM will blow away the AVR. If you are planning to do anything with floating point numbers, an ARM with an FPU will demolish the performance of any processor that doesn't have one.

      Something to watch out for when you move up to faster ARM processors (over 100 MHz) and want to do real time work: exec

  • by rubycodez ( 864176 ) on Friday October 09, 2015 @09:44PM (#50697071)

    8 bit processors are simple, functional and a joy to program; what moron thinks one "suffers" from using the proper sized tool for a job?

    • by gweihir ( 88907 )

      Probably the "bigger is always better" crowd of morons. They would replace a hammer with a nuke if they could...

    • what moron thinks one "suffers" from using the proper sized tool for a job?

      Having to learn good programming practices and dealing with low speed, memory etc is considered "suffering" by a lot of people these days. Sad really.

    • Now what red blooded engineer doesn't want a bigger tool?

      There are a constant barrage of cable channels explaining how you can take the proper suppliments, all for a bigger tool. And mechanical devices!

      So why should your average pundit who reviews microprocessor tools and toolkits, and then goes home to take his EnZip and Vacupro and SusTane products, and then sits in front of a TV alone and dreams of JustOver19 dates, know anything at all about "Fitting a tool to a Job" ?

      Come on, you're expecting rational

  • by JanneM ( 7445 ) on Friday October 09, 2015 @09:53PM (#50697103) Homepage

    The ARM is more powerful, but is also bigger, costs several times more and draws more power. If you don't need the power - many or most embedded applications don't - you're increasing the cost and reducing battery life for nothing.

    Don't get me wrong; A tiny low-end ARM system is fun and useful. Just like an ATTiny, or ATmega, or larger, more capable ARM systems. They all address different needs.

    • by Megane ( 129182 )

      You do realize that this isn't the kind of ARM that you run Linux on, right? This is a Cortex-M microcontroller, and it's meant to do the kind of stuff that AVR does, only with a 32-bit processor and a single address space that doesn't confuse C compilers. There's plenty of sizes of Cortex-M from 2K-128K RAM and 4K-1M flash, and they run the gamut from low power to hardware floating point. As for cost, you're talking about a buck or two per chip average (the big number-crunching monsters might cost as much

      • by JanneM ( 7445 )

        I know exactly what this is. And it is still larger, more expensive and more power hungry than most AVR processors. At the extreme end, you can get an ATTiny in a 8-pin DIP package that costs less than 50 yen in single units and needs nothing more than the usual sprinkling of 10uf capacitors to work. If you need the additional processing power and memory, ARM is a good choice; but in many cases you do not, in which case it is not.

        Neither is "better" in an absolute sense; which is the better choice depends o

        • When you say ARM draws higher power what do you mean? It does not depend only on the instruction set. It also depends upon the process behind the manufacturing of the microcontrollers. Currently ARM microcontrollers from TI are the lowest power i.e. the MSP432 line ARM Cortex M4 MCU's in the market.
  • essentially an arduino with a 32 bit processor. They have even taken great care to make sure that the programming environment is identical and many of the Arduino shields work with minor code or hardware modifications. https://www.digilentinc.com/Pr... [digilentinc.com]
  • by Anonymous Coward

    I always saw that Arduino as performing two fundamental roles:

    1. Give people an easy to use, highly applicable micro controller that has a multitude of uses for hobby and even professional end application
    2. Open the door to other micro controllers that suit different, potentially more complicated purposes

    I'm a latecomer to the Arduino bandwaggon; having come from an EE background I'm already aware of the plethora of micro controller options and I have a good idea about their suitability for purpose. The 8-b

  • This was covered 1.5 years ago in this DrDobbs article: http://www.drdobbs.com/embedde... [drdobbs.com]
    Been there, done that, the breadboarded ARM is a cool toy but not very practical.

It seems that more and more mathematicians are using a new, high level language named "research student".

Working...