Best way to start moving away from Arduino? - Page 1
Forum section: electronics / general

author: soggymushrooms
author_rank: Newbie
timestamp: October 25, 2017, 09:10:48 am
content: Like many other beginners, I currently use an Arduino as the core in most of my projects, but I know I'm sacrificing efficiency, price, and flexibility for ease of use with this approach. Apart from those shortcomings, it's just not as fun to hook up some stuff to an arduino and write some basic code to accomplish most tasks, it just feels like cheating sometimes. I'd like to shift to using microcontrollers other than the Arduino (the hardware and the software), or to not using any microcontroller at all and just discrete components when that is possible.What's the best way for me to start getting familiar with utilizing other microcontrollers, and/or getting a feel for what I can and can't do without a microcontroller? I ask both in terms of the hardware and knowledge I would need to acquire for both of these tasks, particularly for other microcontrollers since there's just so many options and no definitive "best" answer like the Arduino is the best answer for the most easy to use hardware.Any advice or tips appreciated.Thanks,Liam

author: tggzzz
author_rank: Super Contributor
timestamp: October 25, 2017, 09:30:11 am
content: One microcontroller is very much like another; if you can program one you can program another. I was both delighted and horrified at how quickly I resumed doing it after a 20 year gap (horrified because so little had changed).What does change is how you program a microcontroller. There the key points are bit-twiddling registers for internal peripherals, possibly bit-bashing external devices, available libraries, and how you deal with multi-tasking.In the future having good reliable and predictable ways of using multiple cores will be a differentiator. Currently multitasking usually ends up using an RTOS on a single core; be very sure any RTOS deals correctly with multicore processors.For a left-field approach that is very good for high-speed bit-bashing, and excellent for multithread and multicore embedded work, consider the XMOS xCORE devices with xC (Digikey/Farnell). Even if you don't use them, the concepts and design patterns are battle proven and can be used in any design.

author: Fire Doger
author_rank: Regular Contributor
timestamp: October 25, 2017, 09:53:20 am
content: Arduino is a development platform based on atmega, there is no point to move on a different family without knowing to program mcu (I don't think someone knows how to program MCU when he doesn't know what Timer means).A good start is to download datasheet and make a program without using any wiring instructions. Learn it's peripheral, how to write on registers etc.You can use an Arduino board and program it with pure C and an external programmer like any other MCU.

author: Mjolinor
author_rank: Frequent Contributor
timestamp: October 25, 2017, 09:55:49 am
content: The low power 8 pin Pics. Throw away your C compiler and learn the 36 or so instructions.There is a huge amount of satisfaction when you do something and are successful.Bit bashing I2C is a good example. Implementing I2C from scratch with no libraries to help you is a real achievement though quite simple to do with some thought. Getting it into the smaller pics and still having enough room in there to do what you needed alongside the I2C is also not trivial and is a real buzz.

author: danadak
author_rank: Super Contributor
timestamp: October 25, 2017, 10:49:29 am
content: Consider PSOC. It is both ARM based M0 or M3 or M4 cores depending on choice,has a lot of analog capabilty, DSP engine built in (PSOC 5LP), has a fabric whereyou can either create custom onboard logic functions using Verilog or schematiccapture, and overall chip allows routing to internal functions as well as pin choice.So it has a touch of FPGA capability rolled up with decent core and analog.A summary -For me what stands out is -1) Routability2) Fast 12 bit SAR A/D and slow 20 bit DelSig3) DFB (Digital Filter Block) that is dual channel, handle FIR or IIR filters, or DFBcan be used as a GP fast processor block, similar to RISC block4) MSI logic elements GUI based and/or the UDB Verilog capability. Eg. the FPGAlike capability5) Onboard Vref6) IDAC, VDAC, OpAmps (up to 4), comparator, mixer, switch cap, analog mux....7) LCD, COM, UART, I2C, I2S, One Wire, SPI, Parallel, LIN, CAN, BLE, USB9) Custom components capability, create with schematic capture or Verilog10) DMA to offload processes like filters, COM, Display11) ARM M0 (PSOC 4) or M3 (PSOC 5LP) or 8051 core(PSOC 3) or M0+/M4 dual core PSOC 612) Extensive clock generation capabilities13) All components supported by extensive prewritten APIshttps://www.element14.com/community/thread/23736/l/100-projects-in-100-days?displayFullThread=truehttp://www.cypress.com/documentation/code-examples/psoc-345-code-examplesGreat video libraryAttached component list. A component is an on chip HW resource.Free GUI design tool with schematic capture, "Creator". Components have rich API library attachedto each component. Compilers free as well.PSOC 4 is low end of family, consider 5LP parts as well. PSOC 4 also has arduino footprint boards (pioneer) as well. PSOC 6 dual core M0+/M4.https://www.elektormagazine.com/labs/robot-build-with-cypress-psochttp://www.cypress.com/products/32-bit-arm-cortex-m-psochttps://brightcove.hs.llnwd.net/e1/uds/pd/1362235890001/1362235890001_5241352463001_2606504288001.mp4?pubId=1362235890001&videoId=2606504288001Regards, Dana.

author: Quarlo Klobrigney
author_rank: Super Contributor
timestamp: October 25, 2017, 10:59:17 am
content: SPOILER ALERT! AVR Fanboy here. Just learn to program the AVR in C and not use the Arduino shell. Get to the real chip and do some simple tasks.As far as ARM, it all comes down to what are you trying to do, what do you want to learn, how much processor do you need? I'm just a noob to the ST ARM architecture. I bought a Discovery kit (not STDthat's another topic for a different thread) and am learning, albeit slowly.

author: sainter
author_rank: Regular Contributor
timestamp: October 25, 2017, 11:04:34 am
content: I agree with Fire Doger, use Arduino IDE to do the same thing you done before, but with pure C. After you understand registers, timer and working with peripheral devices, go to other MC. I would advice not investing too much time in 8-bit MC and moving up to 32-bit ARM. It's not hard to use them after you understand the things described before.Patrick Hood-Daniel has a channel on youtube. He uses STM32 MC (I have a dev board with STM32L152, so thins fitted me perfectly).If you want to stick with atmel, move to Atmel Studio. You can configure it to flash via avrdude (to upload directly to arduino using arduino bootloader). This way you can learn new development platform without buying anything new. After that you can buy Atmel programmers with debugging tools.What ever you chose, will be better than to dwell on arduino. It's a good launchpad for beginners, but people (me included) tend to get stuck on it.

author: danadak
author_rank: Super Contributor
timestamp: October 25, 2017, 11:23:39 am
content: Here are the boards, attached, concentrate on left most boards. Thereis a $ 25 Arduino PSOC 4 board also quite useful. Link follows.http://www.cypress.com/documentation/development-kitsboards/cy8ckit-042-psoc-4-pioneer-kitNon Arduino versionhttp://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kitsThe high end part $ 10 board, non arduino, very useful as the parts havea full complement of capabilities. Great to learn on.http://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-andRegards, Dana.

author: woody
author_rank: Frequent Contributor
timestamp: October 25, 2017, 11:44:43 am
content: Quote from: Mjolinor on October 25, 2017, 09:55:49 amI second that. It is amazing what you can accomplish with only 1 or 2 k words in an 8 bit, 6/8/14 pin device. The first time you write a working driver for an exotic display, based on its datasheet and not using someone else's driver for it is...like most first times: a great experienceBut I would hang on to the C-compiler; there is also a lot of satisfaction in writing C and knowing what instructions your compiler will make of it. You can bitbang using C, nobody forces you to use functions that came with your compiler. And it certainly does read back more easy IMHO.

author: CJay
author_rank: Super Contributor
timestamp: October 25, 2017, 01:12:13 pm
content: Much as I like PICs, you've already got a decent development platform and the AVR chips are apparently quite nice so unless you want to move on to something completely different then stick with the arduino hardware and the Atmel/microchip tools until you're happy the chips don't suit your needs.It pains me to say it but they are faster and more friendly than the equivalent Microchip PICs.If you want to go further it seems STM32 is a very popular choice, free IDE, compilers and very cheap hardware.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 25, 2017, 01:31:26 pm
content: Only my 2p worth...There is a very compelling reason to stay very close to Arduino.... the hardware is so cheap.. I particularly like the NHduino boards... they are so so so cheap (and have a proper XTAL). In fact the clones are so cheap they are a good source of components for your own designs!So until you reach the point you cannot do something that you want to do stick with Arduino Uno i.e Atmega328PThe points above about getting closer to the bare metal by referring to the datasheet are very good.Once you reach the point that you have a problem that cannot be realised with 328P then you can look for an alternative MCU that meets your requirements.

author: brucehoult
author_rank: Super Contributor
timestamp: October 25, 2017, 01:43:55 pm
content: There is nothing at all wrong with AVR-based Arduino or compatible hardware and there are a huge variety of very cheap boards to choose from. If an 8 bit chip running at 16 MHz with a few KB of RAM will do the job at all then they are perfectly fine.The Arduino libraries are great to get started with easily, but do sacrifice some performance in order to get simplicity of use.You can stick with the Arduino IDE (or switch to using bash, emacs, gcc, avrdude directly if you want) while gradually switching from the Arduino library functions to writing for the hardware directly. The source code of the Arduino libraries provides functioning example code which you can start from and improve.If you need a more powerful processor then you can do the same thing with a ARM or RISC-V or other 32 bit board with Arduino IDE integration.No need to throw out the baby with the bathwater.

author: Peabody
author_rank: Super Contributor
timestamp: October 25, 2017, 01:56:23 pm
content: An alternative to 8-bit MCUs would be the 16-bit TI MSP430 processors. They have built-in oscillators, so don't need a crystal, run on extremely low power, and a few of them even come in DIPs. I've worked with them in assembler, but there's an Arduino-like app available called Energia, and of course TI's own CCS IDE. If interested, you would want to download SLAU144.pdf, which has all the detail.But I have to say, Arduino is popular because it's easy, and because you don't have to know very much about the processor. I enjoy getting a chip with 2K of flash memory and 128 bytes of ram to do lots of stuff for me running at 400 uA, but it takes more time and detailed knowledge to get that level of crunching. Most people just wouldn't be interested in doing that. Also, using Arduino lets you share with others easily, and vice versa - everybody has them, so it's common ground.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 25, 2017, 02:29:52 pm
content: Quote from: brucehoult on October 25, 2017, 01:43:55 pm+1. The Arduino libraries aka 'Wiring' are a abstraction from bare metal but most of these can be 'turned off' whilst staying within the Arduino IDE... i.e. Never return from loop(), do PORT i/o not DigitalWrite i/o.Quote from: brucehoult on October 25, 2017, 01:43:55 pm+1PSThe big step change you get by getting a in circuit debugger is breakpoints... for that AFAIK you need to move outside the Arduino domain.

author: NorthGuy
author_rank: Super Contributor
timestamp: October 25, 2017, 03:03:58 pm
content: If you want to get away from Arduino approach (stick boards and modules together and equal them with a matching set of software libraries), don't repeat it on the other platform.The production-oriented approach would be to design a PCB, print it (very cheap now), solder it, test it, use it. In this scenario you don't select an MCU once and for all. Rather, since your PCB is good for only one project, you analyze your specific task, you select MCU, other parts specifically for your task, put everything together in a unique way.If you don't know enough about the MCU you have selected or the other parts of circuitry, you test it before printing PCB. Many people use dev boards for this. I personally prefer breadboards, if they can handle the speed.

author: brucehoult
author_rank: Super Contributor
timestamp: October 25, 2017, 03:06:33 pm
content: Quote from: NivagSwerdna on October 25, 2017, 02:29:52 pmHell, never return from setup()! Either will work.

author: westfw
author_rank: Super Contributor
timestamp: October 25, 2017, 04:30:10 pm
content: I agree with all of the people who say to keep using your arduino hardware, but start getting more involved with the low-level programming. One way to gain knowledge is to start READING the code in the libraries you've been using. Go ahead and LOOK at the code in digitalWrite(), and figure out why it's "slow" and how you might improve it. And etc...QuoteNo one has talked about this, yet. The sad (?) fact is that MOST of the things that hobbyists want to do with electronics these days are cheaper and easier to do with a microcontroller and some firmware than with "discrete components." The main area I can think of where this might not be true is music stuff - homemade synthesizers, effect pedals, etc. And Ham radio stuff, I guess.

author: asmi
author_rank: Super Contributor
timestamp: October 25, 2017, 04:32:00 pm
content: For me the big step away from Arduino as a platform was purchasing Atmel ICE, that allowed me to program anddebugpretty much any AVR or ARM chip Atmel sells. That facilitated my move to CM0/CM0+ instead of AVR as they are so much easier to work with. Atmel Studio was also a biiig advantage since it's based on Microsoft Visual Stuidio, which happens to be the main software I use professionally for pretty much my entire career, so I felt right at home there.

author: Richard Crowley
author_rank: Super Contributor
timestamp: October 25, 2017, 05:06:39 pm
content: IMHO, products like Teensy and the ESP32 (et.al) are "next generation" products that build on your Arduino experience. You can transition to the hardware while learning on the Arduino IDE, and then graduate to more "hard-core" development methods.The Teensy is like a bench full of 100 Arduinos at little additional cost. And the ESP things seem like a real game-changer if you are interested in wireless iOT, etc. People are only beginning to exploit what the ESP chips are capable of.Teensy:https://www.pjrc.com/store/available in many placesESP32:https://en.wikipedia.org/wiki/ESP32#Development_and_other_boardsfast-growing number of vendors of boards.

author: woody
author_rank: Frequent Contributor
timestamp: October 25, 2017, 05:59:38 pm
content: 32 bits microcontrollers? I have a T-shirt that sums it up nicely: Why insist on 32 bits if you can't handle the first 8?To each her own, but I find programming an 8 bits device where I control everything and I know I am the one to blame if it does not work as advertised a lot more fun that slashing together other peoples' libraries on a pre-made board. If that means I can not have Internet connected hardware then so be it. I do not see any advantage in having my fridge telling the local supermarket that I'm out of pizza anyway.I made an internet connected thermometer not too long ago. Based on a Raspberry Pi. It needed 1 temp/humidity sensor. And 4gigs of OS. A webserver. A lot of libraries. Google Fonts. A wall wart delivering 10 watts. Does it work? Sure. Was it fun making it? Not really. It is making a meal using a Knorr (Kraft?) box and adding water instead of buying ingredients and really cooking something. Do I really understand how and what happens inside this thermometer? Not a clue.YMMV

author: asmi
author_rank: Super Contributor
timestamp: October 25, 2017, 06:02:58 pm
content: Quote from: Richard Crowley on October 25, 2017, 05:06:39 pmI disagree as this move only force you to stay longer on Arduino instead of moving to your own boards as it's not a trivial task to design and build the board for ESP32, unlike atmega328p, which in certain circumstances can work on it's own with no external components whatsoever, and even in most "bullet-proof" configuration requires only few external passives, and thus making designing a board for it very easy for absolute beginners. I've been there not so long ago.

author: Richard Crowley
author_rank: Super Contributor
timestamp: October 25, 2017, 06:07:37 pm
content: Quote from: asmi on October 25, 2017, 06:02:58 pmCurious that you excised the part of my posting that addressed your objection.

author: asmi
author_rank: Super Contributor
timestamp: October 25, 2017, 06:19:49 pm
content: Quote from: Richard Crowley on October 25, 2017, 06:07:37 pmWhat's the point in going to discrete MCUs only to go back to pre-made boards (unless you're good enough at RF design to design the board for ESP32)?

author: JPortici
author_rank: Super Contributor
timestamp: October 25, 2017, 06:26:43 pm
content: Best way to start moving from arduino?take a library and rewrite it.seriously, you have to learn how the peripheral actually work, by knowing how to set up the peripheral itself... Read the chip's datasheet!write your own spi driver for example.you have to move out of the ecosystem

author: Mjolinor
author_rank: Frequent Contributor
timestamp: October 25, 2017, 06:38:26 pm
content: Timing and logic at a really basic level are the things that assembler and machine code programming will teach you. There is no way to get that sort of understanding with any high level language.Even if it is a short term thing it will improve any C (or other) programming you do.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: October 25, 2017, 11:38:40 pm
content: Quote from: brucehoult on October 25, 2017, 03:06:33 pmHell, just write your ownmain()and don't includesetup()orloop(). This sketch will compile and run using the Arduino IDE:Code:int main() {return 0;}

author: Richard Crowley
author_rank: Super Contributor
timestamp: October 26, 2017, 12:50:03 am
content: Quote from: asmi on October 25, 2017, 06:19:49 pmThe point is that you can migrate to a new MCU, learn high-level program, and then low-level coding. And THEN when comfortable with the new platform, dump the Arduino IDE in favor of a more "bare-metal" IDE. And THEN be familiar enough with software and hardware to dump the pre-made boards and roll your own.I didn't get the impression that the OP wanted to dump everything at once and start over from scratch. I was trying to propose a more gradual, step-by-step approach. One equation, one unknown (at least one at a time).

author: daybyter
author_rank: Frequent Contributor
timestamp: October 26, 2017, 02:12:30 am
content: Buy a stm32f103 blue pill and use stm32duino.Then move away from the libs step by step.

author: Ian.M
author_rank: Super Contributor
timestamp: October 26, 2017, 02:19:02 am
content: How to avoid the quirks of the IDE sketch file pre-preprocessing- writing 'vanilla' C/C++ programs under the Arduino IDE, with a normal main() function. Nick Gammon's explanation is not entirely complete - in addition to accepting C++ .cpp source files it also accepts ANSI C .c source files.As the Atmel Studio toolchain for AVRs also uses GCC with the same low-level headers and libraries, most AVR sample code will build under the Arduino IDE with minimal or no changes.N.B.You *CANNOT* have a .c or .cpp source file called main - it clashes with one the IDE auto-adds. Also the Arduino environment grabs the Timer 0 rollover interrupt vector (which it uses for various stuff including millis(), micros(), and delay(), so you cant write your own ISR for that interrupt. Lastly it links with the normal Arduino libraries, so take care to avoid conflicts with Arduino keywords etc.

author: westfw
author_rank: Super Contributor
timestamp: October 26, 2017, 02:28:11 am
content: QuotePerhaps. But you don't need to jump there right away.I'd claim that you never really need "machine code" (and a lot of modern CPU machine code, even the AVR, is pretty awful), except peripherals are complex enough these days that configuring them can be a lot like "machine code."You do probably want to notice at some point that something like:Code:add xoffset[r1+],shiftval ;; vaguely like a possible MSP430 instructionis going to be slower thanCode:add r1, r2(which issort-ofmachine language)(less so on RISC cpus where you won't HAVE the first sort!)QuoteAre you sure about that? recent versions of the IDE have separate build directories for the user files and internal files, and I think that name conflicts no longer cause problems. A quick test seems to confirm this.

author: cdev
author_rank: Super Contributor
timestamp: October 26, 2017, 03:09:01 am
content: Just "try not to look like prey", (Joke)and when you move away, do it slowly and calmly always keeping your eyes on them.(advice given to hikers on how to survive an encounter with a mountain lion)

author: RES
author_rank: Regular Contributor
timestamp: October 26, 2017, 10:41:28 am
content: Quote from: soggymushrooms on October 25, 2017, 09:10:48 amStay on the AVR micro (ASM, BASIC or C), begin with the ATtiny series DIP8 package, ATtiny13 or ATiny25. Begin to design combined CMOS/TLL + micro circuits, for example a simple 4-digit 7-segment clock or up/down counter, debounce buttons, etc.(straight forward code).After a few years practice (assembler takes more time to learn) you can create the more complex designs and programs. Or. Moving from micros to CMOS/TTL+ discretes can be fun too (logic algebra, truth tables), no need for programming and lots of people can build your designs, but more cheap components means larger pcb, more complex circuits.

author: legacy
author_rank: Super Contributor
timestamp: October 26, 2017, 01:43:46 pm
content: take ucKeil, a ULINK cable, some ARM-boards from Olimexand you will be ready

author: brucehoult
author_rank: Super Contributor
timestamp: October 26, 2017, 07:04:52 pm
content: Quote from: westfw on October 26, 2017, 02:28:11 amThis is true. The encodings can be pretty unfriendly to human decoding.Unlike, say, the 6502.A couple of weeks ago I was at dinner with a bunch of people from a RISC-V conference. One of the others there said he started out on the Apple ][. I said "What does this do? A9 C1 20 ED FD 4C D0 03"He knew. Immediately.(it prints an "A" on the screen and then exits to AppleSoft BASIC.)Everyone who learned low level programming on those machines in those days seems to remember that A9 is "LDA immediate", 20 is JSR (and 60 is RTS), 4C is JMP. $FDED is the address of the COUT function. And you get to the monitor with "CALL -151" and get back with "3D0G" (Go at $03D0)Most of the time the first hex digit tells you the operation and the second one tells you the addressing mode. Simple. Memorable 35-40 years later.

author: woody
author_rank: Frequent Contributor
timestamp: October 26, 2017, 07:33:21 pm
content: IIRC the 6502 had a LOT (13?) of addressing possibilities that were not always very clear to me. Direct or indirect, indexed or not indexed, absolute, relative and what not.I found the 6800/02/08 a lot simpler in that respect.

author: Mr. Scram
author_rank: Super Contributor
timestamp: October 26, 2017, 07:49:50 pm
content: Quote from: soggymushrooms on October 25, 2017, 09:10:48 amHave you tried making your own board with an ATmega328p, programming an Arduino board using Amtel Studio or tried working with another member of the AVR family? Those are excellent first ventures into non Arduino territory. You'll learn to use a "real" IDE, read datasheets and find out about registers and the requirements of a specific chip. After that, crossing over to another chip family won't be scary, since it's basically the same thing with another flavour.Start pulling away the curtains and you'll start building skills that are applicable to pretty much any microprocessor family.

author: apelly
author_rank: Unknown
timestamp: October 26, 2017, 08:16:06 pm
content: Quote from: cdev on October 26, 2017, 03:09:01 amTotally off topic, but you reminded me of advice for intrepid explorers:When venturing onto the savannah wear bells and carry pepper spray. Stay alert for lion sign. Juvenile lion sign contains fur and pieces of bone. Adult lion sign has bells in it and smells like pepper.There's a lot of good advice in this thread. Mainly, the MCU doesn't matter. Dive in with some plain asm/c/c++ and get your blinky going on bare metal on an Arduino board.I'd suggest investing some time learning how to use a decent IDE. And git. This will take effort. Others will tell you what a dick I am for suggesting you skill up here instead of just getting better at code. In my opinion they are the two most beneficial productivity tools on a coders bench. These skills will go a long way. The Arduino IDE is... Well... Simple and easy to use. My rule of thumb for software: Simple always means limited. The easier it is to use, the less flexible it is and the less it can do.

author: Howardlong
author_rank: Super Contributor
timestamp: October 26, 2017, 08:42:13 pm
content: Although my PIC experience is several orders of magnitude greater than my AVR and Arduino experience, if you’re trying to move to more bare metal, I don’t see why you wouldn’t stick with AVR to begin with.I have no clue how to program an Arduino board at bare metal level from the Sketch UI, until this thread I didn’t know you could do that, but I found programming Arduino boards from Atmel Studio with a hardware debugger to be far, far simpler than I expected, it was a matter of a few minutes to get a blinky working. As an aside, I find the Atmel Studio experience including the edit/compile/program/debug/run cycle is slicker and astonishingly fast compared to MPLAB X/PIC too. Atmel Studio is Windows only though I believe.

author: Mr. Scram
author_rank: Super Contributor
timestamp: October 26, 2017, 08:53:08 pm
content: Quote from: apelly on October 26, 2017, 08:16:06 pmDo you mean GitHub or actual Git?

author: Mr. Scram
author_rank: Super Contributor
timestamp: October 26, 2017, 08:58:49 pm
content: Quote from: Howardlong on October 26, 2017, 08:42:13 pmToo bad the programmer is so expensive compared to pretty much any other. Even though you generally pay in time many times what you pay in money, asking 2 to 10 times more than competitors isn't smart, especially if you want to attract people migrating from Arduino to something more serious.

author: brucehoult
author_rank: Super Contributor
timestamp: October 26, 2017, 10:14:18 pm
content: Quote from: Mr. Scram on October 26, 2017, 08:53:08 pmgit certainly.It's very hard to experiment with changes to your program without a good way to go back to previous versions. Commit early, commit often, learn to use branches, merging, rebasing.Even if you're the only person working on it and it never leaves your PC got is immensely valuable.Plus, yes, you can trivially back up your whole history to another PC or the cloud or collaborate. You can use github for that, but you don't need to. ssh is plenty.

author: stj
author_rank: Super Contributor
timestamp: October 26, 2017, 11:05:26 pm
content: ARM is the way to go,this is the best "bang for your buck" at the moment.144pins, built in programmer, 400MHz < yes you read that correct!!!!http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-nucleo/nucleo-h743zi.htmlso new you cant get them easily though!!

author: Mr. Scram
author_rank: Super Contributor
timestamp: October 26, 2017, 11:18:53 pm
content: Quote from: stj on October 26, 2017, 11:05:26 pmWhere's the fun in having that many resources at your disposal?

author: MT
author_rank: Super Contributor
timestamp: October 27, 2017, 12:03:19 am
content: Quote from: soggymushrooms on October 25, 2017, 09:10:48 amARM for obvious reasons and because everybody "says so", then 5 years later you start to seek for other manufacturers because your feed up with the partly retarded STM32, because everybody "says so" and because its true, the reason people use STM32 was because they where cheap and you got gazillion peripherals now when you found out all the dumbarse design implementations ST have done on all families (besides HAL, CubeMX,LL, on and on) you hate them and start cringe. So 7 years passed, now all ARM MCU manufacturers makes you cringe for various reasons except NXP. 10 years passed, now your quite an expert on ARM and all your time is spent on EEVblog arguing with other "disappoints" about various ARM MCU vendors who have made you cringe (except NXP, because they say so) over the years and wish it was 1980 and happy 6502 assembler days!Happy bare metalling, i wish you the best cringes..

author: Howardlong
author_rank: Super Contributor
timestamp: October 27, 2017, 06:45:31 am
content: Quote from: Mr. Scram on October 26, 2017, 08:58:49 pmIf you're only after aprogrammer, you can use AVRDude directly with Atmel Studio and Arduino boards, zero cost. I do agree that thedebuggeroptions for AVR are not the cheapest. Having said that, regarding any tool cost, you have to weigh up your own cost of time against the convenience of having a seamless out of box experience, I can only say that against many other vendors' toolchains, I have been very pleasantly surprised with the whole Atmel experience.Regarding several folks' suggestions of going straight to ARM, may I respectfully suggest that that in itself is a can of worms. Before the OP writes a line of code, just trying to understand the ARM market and the enormous number of options out there is a time sapping experience.I also think that if the OP is after getting an understanding of bare metal programming then personally my experience tells me that ARM is not the easiest of places to start. Sure, some may have on-chip USB programmer/bootloaders, and the hardware development tools may be cheap as chips, but $ alone is not the only cost, there are a great many complexities for ARM hidden away that pretty soon you'll have to know about and figure out how the vendor has swept it under the carpet in their specific toolchain implementation.The benefit of going for a more rudimentary device like the ATmega328 is that you don't get sidetracked unnecessarily into rabbit holes by these details because to a large extent they're simply not there.Considering the tools and devices that the OP already has, they could start right now, and not have the hassle of analysis paralysis over which ARM to buy.

author: Ian.M
author_rank: Super Contributor
timestamp: October 27, 2017, 07:52:57 am
content: One could do a lot worse than Atmel'sATmega328P Xplained Miniboard. Onboard debugger, Arduino compatible footprints for headers and the same MCU as an Arduino Uno.

author: hamster_nz
author_rank: Super Contributor
timestamp: October 27, 2017, 08:41:54 am
content: Unless you really have a long term plan you want to follow (e.g. I want to be an expert in X), you can't go too wrong if you just try something different for your next project:- Stick to the Arduino environment, and dig into the lower levels - you can even experiment with inline assember if you like- Pick a sensor of protocol that nobody else uses and build an Arduino library for it. Add to the community.- Get an H/W debugger, switch to AVR studio, and read the datasheets if you want to really power up your AVR skills and knowledge- Go to the really minimal tiny MCUs if you like logic puzzles and learning assembler. I fondly remember the PIC16F84 days...- Prototype on Arduino, then move your to custom PCBs if you like the smell of solder- Go for something like a Ti TM4C123 LaunchPad dev board if you just want to try something different, but with a 'professional' edge to it (simulator, debugger, Keil)- you can even do the EdEx course from University of Texas if you feel the need:https://www.edx.org/course/embedded-systems-shape-world-utaustinx-ut-6-10x- Go for an ESP32 in Arduino if you want Wifi and to feel like bashing your head against a wall due to the lack of examples- Go for the Pi Zero and stick with I2C sensors if you are more interested in the application than the lower levels, and Python along the wayPlenty of options - each one you will learn something different, none of them a waste of time.Which calls to mind my current tinkering project - a few WiFi modules for monitoring the temperature/humidity around the house.- I could use a Arduino Library and an off the shelf Temp module and a WiFi shield, but that would cost big $$$, and can't be battery powered- I could use a Raspberry Pi Zero, and an I2C sensor, but where is the fun in "reading "/dev/i2c/" from a web page,it would be cheaper then the Arduino project made using parts from the local hobby shop.- I could use a bare AVR, design a PCB and reflow it, and put 433MHz RF modules on it, but really? who has the time to design, build and bring up a board for a one off weekend project.- I chose to go with ESP32 - can use low power modes to save battery, has on board Wifi, can be battery powered (approx 150mA @ 5V when Wifi is active,way less than 1mA when sleeping). Total project cost about $7, including sensor.It has been interesting so far. The DHT11 sensor's protocol works in a time scale that is tricky to work in, as it needs timing of 10us to 100us pulses (see image).The ESP32 is still quite new, and a quick review showed that the first-hit GitHub library for the ESP32+DHT11 suck. For example:Code:/*-------------------------------------------------------------------------------;;get next state;;I don't like this logic. It needs some interrupt blocking / priority;to ensure it runs in realtime.;;--------------------------------------------------------------------------------*/int getSignalLevel( int usTimeOut, bool state ){int uSec = 0;while( gpio_get_level(DHTgpio)==state ) {if( uSec > usTimeOut )return -1;++uSec;ets_delay_us(1);// uSec delay}return uSec;}Writing by somebody who is still thinking in a low end micro mindset, and is relatively clueless about how to do things when you grow into bigger, more complex environments where interrupts may be pinging off - but to their credit, at least they realize it!It appears that the ESP32 has a 'RMT' peripheral that is perfect for this. Originally designed for using with IR remote controls it counts the length of high/low pulses and stores them in RAM, until it times out. I now have an interesting and somewhat useful < $10 weekend mostly software project where I might learn something that will be handy.

author: woody
author_rank: Frequent Contributor
timestamp: October 27, 2017, 10:09:22 am
content: Quote from: hamster_nz on October 27, 2017, 08:41:54 amDon't know about the Zero, but with a standard Pi it looks like this

author: ElektroQuark
author_rank: Unknown
timestamp: October 27, 2017, 10:16:37 am
content: Are you afraid that the OP is out of the discussion?

author: zeqing
author_rank: Regular Contributor
timestamp: October 27, 2017, 10:37:43 am
content: i am absolutely different with you , i used the ARM7/ARM11, and FPGA, and STM32 when was in school and the first years as work, and then i found the Arduino, after 5 years' usage of Arduino, now i can not remember anything about the other controllers.....

author: hamster_nz
author_rank: Super Contributor
timestamp: October 27, 2017, 11:14:30 pm
content: Quote from: woody on October 27, 2017, 10:09:22 amNow off the breadboard, just have to start looking for a salvaged LiPo.It is logging temp and humidity to the serial console, but I have to finish off the Web Server S/W to make it look pretty.Using the ESP32's RMT was much easier than expected

author: apelly
author_rank: Unknown
timestamp: October 30, 2017, 06:30:55 pm
content: Quote from: Mr. Scram on October 26, 2017, 08:53:08 pmActual git. From there you can make Github sing like an angel.

author: Random Model Maker
author_rank: Regular Contributor
timestamp: October 31, 2017, 11:27:44 pm
content: How about Atmel ASF?It is basically a piece of software that comes with Atmel Studio, which takes over the register handling and bit manipulation that you have to to when programming microcontrollers.Now it is still a tiny bit cheating, I'll give you that, but you will have to do more work than in the Arduino IDE, as you need to use "real" C/C++.I found this to be an easy way to improve my basic programming knowledge without having to deal with the big datasheets, which I gradually introduced to myself once I was comfortable with the programming.

author: brainwash
author_rank: Frequent Contributor
timestamp: November 03, 2017, 01:09:12 pm
content: Here's my experience when I was in a similar predicament: I enrolled into a free online course:https://www.edx.org/course/embedded-systems-shape-world-utaustinx-ut-6-10x. It used the TI Stellaris board which is ARM-based. As an IDE they recommended Keil. If you know a bit about uC you can get through the course in about 20 hours, you will still learn a lot of new things.Another option is to watch the excellent ECE4760 courses by Bruce Land on YouTube. I would recommend getting started with the AVR 328 ones first and do all the homework/lab assignments, since you already have the board. Once you get comfortable with that, you can maybe follow the new series, in which he uses a PIC32MX.

author: MAntunes
author_rank: Regular Contributor
timestamp: November 03, 2017, 05:35:52 pm
content: Quote from: brainwash on November 03, 2017, 01:09:12 pmCould you provide me the link to these PIC32MX videos?

author: brainwash
author_rank: Frequent Contributor
timestamp: November 03, 2017, 07:08:05 pm
content: It's one of the playlists over here:https://www.youtube.com/user/ece4760/playlistsHe also does a course on bio-medical electronics and FPGA, all of them are really great, but the FPGA one was too complicated for me to follow.

author: mperativ
author_rank: Newbie
timestamp: November 09, 2017, 06:32:29 am
content: I got into the embedded world a few years before Arduino and others like it. I'm sure there were easier approaches, but the way I learned was by putting a PIC16 into a breadboard and going from there. I have always since followed this approach:1) Determine what parts of your project will need microcontroller support, such as displays, audio codecs, memory, etc.2) Determine exactly how many GPIOs you will need, as well as specific microcontroller peripherals.3) Go to DigiKey or any distributor whose website has a parametric search option and start browsing for controllers that support those requirements. If, as an example you needed to support all three devices mentioned in #1, you might want a chip containing an LCD controller, I2S, and memory interface that fits your memory type.4) You'll be left with (hopefully) a choice of a few chips from a few different vendors to choose from.5) It now comes down to package size and cost. If it doesn't impact the space and cost too much, I like to choose a chip that will leave me with a handful of unused pins. Your project, when all is said and done, will not work EXACTLY the way you expected when you first designed it, and you will thank yourself for the extra GPIOs down the road.6) Now that you have chosen a controller, it's time to create a schematic of your entire project. This will ferret out problems like discovering that your controller has two needed peripherals multiplexed to the same pin(s), discovering that you don't have enough GPIOs, etc. Make sure you thoroughly read the datasheet sections relevant to the uC peripherals you will be using, as well as the datasheets for any external devices. If you have done that, your now finished schematic should be accurate enough to move on to prototyping.7) If you will be prototyping by hand, try and find a package you can work with. DIPs are becoming more and more rare these days so learning to do SMT soldering could help a lot in this regard. There are many ways to approach building a new project, which I will not go into here.If you've never used the controller you chose, start by getting an LED to blink. If you reach this point then you can continue on to designing in the other modules into your project. If you're breadboarding, don't connect everything together at once, integrate each item one by one.9) On the code side of things, it is just as important to constantly refer back to the datasheets in order to get your peripherals working properly.NOTE)If you're learning something new, try to avoid libraries that do all the hardware work for you. After all, isn't that why you wanted to move away from Arduino in the first place?