本帖最后由 ddllxxrr 于 2015-1-24 21:55 编辑
Even I am guilty of thinking at Atmel’s AVR® 8-bit micro when I hear the word Arduino. But Arduino is also ARM®-based. Problem is that people conflate Arduino the company with the Arduino IDE (integrated development environment) with the Arduino UNO, which is just one of the many hardware boards Arduino makes. I note when describing projects with my engineer friends it helps to spell things out. I try to say “the Arduino IDE” when I am talking about the software platform that runs on your computer. And then when talking about the board, spell that out too, saying “Arduino Uno” or “Arduino Due” so people know the exact hardware I am talking about.
The first and still popular Arduino Uno was built using an Atmel® 8-bit AVR micro. But the Arduino Due is based on the Atmel SAM3X MCU. That is based on an ARM Cortex®-M3 core, and that is some real horsepower, as you would expect from a 32-bit microcontroller. It has native USB, 12-bit ADC (analog to digital converter) inputs and 12-bit PWM outputs.
More recently, Arduino the company came out with the Arduino Zero hardware development board. It is based on the ARM Cortex M0+ core used in the Atmel | SMART SAM D21 micro. The M0+ is turning into a very popular core, as evidenced by the fact the Zero is on back-order right now.
The really cool thing about the Arduino Zero is that it also has a debugger chip on the board. That way if you do want to use it with an IDE that has a debugger, like Atmel’s free Studio 6, you can. It also portends that one day the Arduino IDE may have a debugger, and that would be really cool.
I asked my buddy Kenneth Finnegan what was so great about the cross-platform Arduino IDE. He said, “Two big buttons, ‘Compile’ and ‘Program’.” Actually they are called “Verify” and “Upload,” but you get the idea. And his point was there are only really two critical buttons, the IDE is simple and intuitive. There is a third button “Serial monitor,” you can use to monitor or talk out the serial port, and that is pretty nice too. Atmel’s Studio 6 can be pretty daunting for a hardware guy like me. I was at a focus group where one engineer loved Studio 6 since it is based on Microsoft Studio, with a similar user interface. But Studio 6 only runs on a Windows box, although it does work with AVR, AVR-32 and ARM. And the great thing about Studio 6 is it has a simulator and debugger.
But for a crusty assembly language programmer like me, I can often get by without a debugger. And that is a major point in the whole modern “community” way of designing things. Many times you are starting with a block of working code, so it is a fast way to get up and running. Get the blocks strung together, and use printf statements out the serial port to figure out any bugs. What is exciting is that you can use the Zero to do some quick-and-dirty tests, and then if you have a complex interrupt-driven code base, you can always use the debugger when you need to see what is going on inside the chip.
I can tell you this. I am still getting my arms around Atmel Studio 6. I have managed to hook up a SAM D20 ARM Cortex-M0+ based eval board and downloaded a sample program to it. But I am still figuring out the debugger. I may have to read the manual, and no man likes to do that. But when I installed Arduino, it was only a couple days before I was installing and removing programs from an Uno, and changing the program to do different things. This including bi-directional communication, so I could type a number or string into that Serial Monitor and the Uno would blink a light, or return a string or some other behavior.
My programmer pals tell me coding for Arduino hardware is a simplified C++. Massimo and the gang at Arduino the company has done a great job and done some really clever tricks to make it accessible and usable even for novices like me. I had two big problems. The first was the Atmel firewall did not let Linear Tech install (for their Linduino board) install the USB driver for serial port emulation. This is a really basic driver. It’s nice that I sit next to the web programmers, so one of them showed me how to use the Windows 7 device manager to see what was wrong. The driver was in the Arduino install folder, I just had to install it from my hard drive.
The second big problem I had was with paths. I did not know you have to use the “Files>Preferences>Sketchbook location” menu in Arduino IDE to point to the sketchbook location for the Linduino programs I was playing with. Paths. Gee, this is back to DOS 1.0. If Google can find all the information on any subject in the world in a few tenths of a second, you would think a program could figure out its paths and dependencies with 4 processor cores running at 2GHz each.
Oh, speaking of my pal Kenneth Finnegan, check out his unboxing of the ARM Cortex-M4-based SAM4L8 dev kit. I love how he thinks of micros—that a 32-pin ARM-based chip should have an expected set of features, no matter who makes it. I am sure that makes our Marketing people cry.
Meanwhile, I have to put “Extensive C++ programming experience” on my resume and LinkedIn profile
|