How to grow past arduino - Page 1
Forum section: electronics / beginners

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: April 09, 2017, 09:22:24 am
content: Hi guys,I'm mainly an analog/low level digital guy. I almost never do any programming for embedded, if I do any programming it's usually scripts for on my computers or assignments.I have an arduino mega that I bought a couple of years ago for a project that never got finished. I would now like to grow into programming microcontrollers without all this arduino overhead (cost, physical and programming size/speed). I don't really know how to get started tho. I was originally planning on using my arduino mega as a programmer, but I then found that every single example I seem to come accros uses the uno as a programmer - first putting the arduino bootloader software onto the target, then removing the uC from the Uno, and pretty much just using the target in the Uno board.So I was looking at getting a programming cable, but this seems somewhat intimidating and I don't really know where to get started. Should I just get an uno and use that? Or can I use my Mega as a programer to?

author: Avacee
author_rank: Unknown
timestamp: April 09, 2017, 09:29:25 am
content: One option is to skip the programmer and go straight to the Arduino chip.Much smaller, uses a lot less power for long duration battery powered projects, and much easier to put on some stripboard in a project box.Or get some Nano's and Mini's for a couple of dollars each.https://www.arduino.cc/en/main/standalone

author: RoGeorge
author_rank: Super Contributor
timestamp: April 09, 2017, 09:56:16 am
content: This is a good place to start:

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: April 09, 2017, 10:30:00 am
content: Quote from: RoGeorge on April 09, 2017, 09:56:16 amThanks! I'm gonna check that out!Quote from: Avacee on April 09, 2017, 09:29:25 amThat would work! I don't know what to think about the Nano's and Mini's. Seems like I might as well just buy the parts myself at that point, the thing (for me) that makes arduino attractive is the "plug-in-usb-and-go" concept. If I need an external programmer anyways...

author: danadak
author_rank: Super Contributor
timestamp: April 09, 2017, 11:39:16 am
content: Given you mention analog / low level digital, consider a PSOC. SimpleUSB interface for program / debug. Tool (PSOC Creator) free, drag anddrop everything from simple gates to complex counter, timer, LUT,serial.......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)12) 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 wellhttps://www.elektormagazine.com/labs/robot-build-with-cypress-psochttp://www.cypress.com/products/32-bit-arm-cortex-m-psocSimple logic to complex capability, drag and drop, roll your own -Regards, Dana.

author: danadak
author_rank: Super Contributor
timestamp: April 09, 2017, 11:48:08 am
content: High end simple board -http://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-andhttp://www.cypress.com/documentation/development-kitsboards/psoc-5lp-development-kitsLow end board -http://www.cypress.com/documentation/development-kitsboards/cy8ckit-042-psoc-4-pioneer-kitProgram in C (preferred, all components have C APIs to control the components), or ASM.Regards, Dana.

author: rstofer
author_rank: Super Contributor
timestamp: April 09, 2017, 03:59:17 pm
content: Or, buy the book and follow along (STM32 chips):http://www.carminenoviello.com/mastering-stm32/

author: retrolefty
author_rank: Super Contributor
timestamp: April 09, 2017, 08:51:47 pm
content: QuoteYour mega board can certainly act as a external ISP programmer by loading and running the ArduinoISP sketch located in the IDE example sketches. It's just a matter of using the correct I/O pin numbers wiring to the targer chip, as the arduino AVR hardware SPI pins are located on different pin numbers going from uno to mega boards. Using the 6 pin ISP header on the mega board will work easier in that is wired correctly for using the AVR's hardware ISP signals.

author: Ian.M
author_rank: Super Contributor
timestamp: April 09, 2017, 09:20:59 pm
content: Yes, but don't forget that you need to break out the RESET pin of the programming cable at the Arduino end and extend it to a pin to fit in D10 of the I/O port headers as the sketch specifies. Jumpering from an Arduino to a breadboard to program AVRs occasionally is one thing, but if you are going to be doing it regularily, you'd do better to get a dedicated USB-ASP off EBAY, or hack a CH240 Nano clone from a cheap 10 pack:- Don't fit the long headers, then after checking it has the Arduino bootloader, cut the Reset track to its ISP header, patch it to D10, and install 3mm LEDs + series resistors directly on D7, D8 & D9 as documented at the beginning of ArduinoISP.ino. Put the resistors on the cathode side of each LED and solder the other end to the nearest corner of the top of the USB socket for a convenient ground point.

author: lem_ix
author_rank: Regular Contributor
timestamp: April 10, 2017, 09:55:09 am
content: Atmel clone programmers are ridiculously cheap so go with any one of those. Only thing to watch out for is that it has some adapter for the 6 pin header.Use that atmel studio(easy/bloated) thing or set up your own gcc enviroment(harder/customizable/diy make files). Dig around here for more info:http://www.ladyada.net/learn/avr/programming.htmlBunch of avr tutorialshttp://maxembedded.com/Atmega mcus are simple and should be fine for a beginner. After you cover the basics switching to something more powerful won't be much of a problem.

author: dimkasta
author_rank: Regular Contributor
timestamp: April 10, 2017, 10:31:51 am
content: You should be able to use your mega as a programmer. I just tried it yesterday and it works without issues.Just follow the instructions below, and the comments in the ISP sketch.https://www.arduino.cc/en/Guide/ArduinoISPFor "virgin" chips, just burn the bootloader first to have the fuses set for you, and then burn whatever you want.

author: Ian.M
author_rank: Super Contributor
timestamp: April 10, 2017, 10:45:22 am
content: The Arduino IDE installs a perfectly usable AVR GCC toolchain - you just have to know where to find it. Westfw wrote a batch script for Windows PCs that finds it and adds it to your path so you can easily invoke it from the command line. Seehttps://www.eevblog.com/forum/blog/adventures-in-avr-isp-programming/msg1147021/#msg1147021for details.The rest of that topic is also worth a read.

author: ohdsp
author_rank: Contributor
timestamp: April 10, 2017, 10:48:49 am
content: Might be worth mentioning that once you are past the bootloader on the Arduino you can do what you want with the chip. The Arduino programming interface seemed to accept/compile (or it used to, assume it still does) standard AVR assembler and C code allowing you to bypass most of the overhead of the Arduino. I have used this before on the Mega for development of a couple of projects; let the boot loader do it's thing, reconfigure the registers/device as you need and ignore the Arduino libraries and use you own code.It meant you could do a lot more, all under your own control, but still get away with the mega board and Arduino software only. Much less intimidating than going full on Atmel Studio/programmer tool. The good thing is once you have "normal" code you could port to Atmel Studio for development fairly easily.Atmel make nice microcontrollers so no reason not to start with them.

author: tszaboo
author_rank: Super Contributor
timestamp: April 10, 2017, 11:06:14 am
content: Really depends, what you are trying to do.To go beyond arduino, it is not really worth it to use any other 8 bit micro, as they will not offer much more. So go for 32 bit. AVR32 is going to die. PIC32 is OK, if you can live with microchip. ARM is the mainstream, well worth to learn.With ARM you have a bunch of companies to choose from.Atmel, now microchip, is making ARM microcontrollers.TI is expensive.ST is probably has the most well rounded family, and I would highly recommend them. Programmers cost less than a pizza.NXP is another candidate, though I prefer ST.And then there are the small ones.I recommend not using cypress, because their sales channels or support is really weak here.Ultimately, I dont recommend any of the small microcontroller manufacturers (or big manufacturers, with microcontroller as a side business), because it is not worth your time. If they dont have a low power Cortex M0+ to a 120Mhz M4F, dont waste time on learning one.A bunch of fanboys will throw rocks at me for this. But I've been there, programming is ultimately boring, just use what gets the job done, flexible, and gives me the least headache.

author: dimkasta
author_rank: Regular Contributor
timestamp: April 10, 2017, 11:13:52 am
content: FPGA is also very nice if you are looking at powerful alternativesGranted, it will be more expensive and hands-on to get started, but it should be a far more marketable skill if you can work VHDL or Verilog, when everyone and his cat has experience with AVRs and arduino.

author: ohdsp
author_rank: Contributor
timestamp: April 10, 2017, 11:15:24 am
content: Depends where you are coming from though, if you are fairly new to programming any micros without using the Arudino Libraries to do it all for you then the 8 bit microcontrollers are simple enough to not cause you too many headaches.A lot of people like to try and jump-the-gun these days.For any professional project in a commercial/industrial application it would make sense to start with something like an ARM chip; but if you are just trying to work out the basics like how to use a programming cable then I would still advise to start on a simple 8 bit chip myself.

author: sleemanj
author_rank: Super Contributor
timestamp: April 10, 2017, 11:22:01 am
content: I personally think people should start with an ATTiny, especially something like the Tiny13 or 25/45/85.Why? Because it's small, the abilities it has are necessarily limited, everything you learn (well the concepts) is directly applicable to the other AVR 8 bit chips, and getting a working toolchain is as simple as downloading the Arduino IDE, something chip manufacturers should learn from.Anyway, it is both less daunting a prospect to dig into the inner workings, and more challenging in getting your code to fit, which makes you think about embedded concerns, forces you to learn about things like PROGMEM, and the amount of RAM you have, it will probably convince you to look at the disassembly of code at some point to see what's going on and how you might optimise things, and eventually it could even coerce you into wanting or needing to inline some assembly.You can start with using anArduino Corewith it and just program it "like an arduino" using pinMode and digitalWrite etc, and then progressively have a look to see how said core works to "do it yourself" by bit twiddling in the registers if you want.The biggest problem, is thinking of a project in the first place to get started with. A simple calculator might be a fun task to fit into a Tiny85, or maybe even Tiny13, lots of concepts there.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: April 10, 2017, 11:33:23 am
content: Quote from: TheUnnamedNewbie on April 09, 2017, 09:22:24 amSounds like Arduino is ideal for you.QuoteHmm, so you didn't complete basic training, but now want to skip to the advanced stuff?QuoteWhat overhead? Arduino is cheap, small and relatively fast. The core code can slow things down a lot, but it is easy to write directly to the chip. If you want a bigger chip, not all Arduinos are AVR - there are several Cortex M3 and M4 chips which are much more powerful.QuoteReally, if you can't get the hang of simple Arduino stuff, you will be totally lost in a bare bones embedded development environment.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: April 10, 2017, 11:36:42 am
content: Quote from: TheUnnamedNewbie on April 09, 2017, 09:22:24 amYou can actually take your development a long way further without abandoning the Arduino development environment... although the Arduino IDE and libraries hide much of the complexity and fun of the underlying hardware from you by providing the 'wiring' layer it is possible to access these directly and get to grips with the real hardware and even program in assembly if so inclined.It is really useful to understand about the hardware peripherals available on the silicon and in the case of an Uno it has some very capable bits and pieces.e.g. Wiring hooks Timer0 for use with delay() and millis() functions but you can use the raw timers if you like so for example I wanted to get a reliable 100Hz timer so used Timer1 directly... there is some code to do this herehttp://www.hobbytronics.co.uk/arduino-timer-interruptsbut it is not ideal since the interrupt latency would affect the count... CTC mode is better... but to code that you need to understand the hardware and which interrupts etc.The Mega has even more fun hardware so explore that in detail as far as you can before you abandon the Arduino IDE.You can drop down a level and use an AVR Dragon or Atmel ICE next but to be honest you can get so far with the Arduino IDE my Dragon spends the majority of the time in its box.Check outfor some low level info. To be honest I tend to stick with C rather than Assembly but it might be a good way to get a bit deeper into the detail.Have fun!(Uno hardware from China is so cheap I've taken to just buying the NHduino boards and re-using the components)[If you really want to move on then it gets really confusing... there are so many alternatives!)

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: April 10, 2017, 11:38:51 am
content: Thanks all for the replies!I would like to point out that maybe I misrepresented my level of skill in my original post.I have experience programming PICs in MPLAB, as well as building a crypto-coprocessor on a ZYNQ (modular exp. and multiplier in Verilog, other stuff in C/assembly on the ARM core).However, all of these projects were at my university, with a) Prebuilt boards with a nice "plug the programmer we give you in here" and b) already big template projects (eg the ZYNQ project) where we just get to add files and such. In terms of physical programming it was all just "plug the cable in and press the program button"The thing that is putting me off is the complexity of all the boards and projects we already had. I don't really know where to get started - digital hardware is an alien world to me, I've only ever done analog and RF circuit design.I asked this question because I know that a lot of microcontrollers cost a few euros at most (1off quantities), and thus being able to put really simple projects on a external micro would make a lot of projects more reasonable. However, every time I tell myself I should get started I waste a day trying to figure out what components I need to buy int he first place, struggle with 24 software libraries, and then end up throwing my hands in the air and say "screw this, I'll just order an arduino if I really need this".Knowing the mega can be used as a programmer is nice to know - I got the impression that you needed to remove the microcontroller on the arduino in order to use the board as a programmer (essentially, you'd be just using it as a really fancy FTDI serial board).Quote from: sleemanj on April 10, 2017, 11:22:01 amYeah, finding projects is always a pain. I have a few in mind tho, all quite simple control-type applications (a way to monitor the AC/light/temperature in my lab, for example)Quote from: donotdespisethesnake on April 10, 2017, 11:33:23 amI think you (understandably) misunderstood my OP. I have no experience with the physical implementation - I have programmed quite complex systems, but that was always only programming, with very basic hardware-interfacing (or even none at all because they were provided by libraries).And the project that I never finished was not due to it being to complex, or because it was training - just because I started realizing that the cost would be a lot higher than I originally expected and decided, at the time, it wasn't worth it.

author: Rerouter
author_rank: Super Contributor
timestamp: April 10, 2017, 11:50:29 am
content: My best recommendation is approach it similar to how i did,Work with the arduino IDE your somewhat familiar with, and begin writing code that talks to the peripherals, e.g. reading and setting inputs / outouts via registers, its still in C code, but its working on the AVR chip rather than just the macros, say next you might want to count or time an external input, well you have peripherals in the chips to do that, next you want to run 3 different interupts, but not on the dedicated pins, in comes the pin change interupt mask,Then there are power modes, and fun tricks like the ADC conversion can take place while you run code, only having to read it out some time after a register with a flag is set,familiarise yourself with taking to and controlling more of the bare AVR chip, this was the learning gap that helped me jump to the AVR side rather than just the arduino side,the IDE is still a workable IDE, even if it is basic in functionality compared to others, but for myself i prefer it that way, as i am not yet advanced enough to use even a fraction of the tools in the bigger programs, being a self taught programmer. (e.g. advanced beginner)

author: dimkasta
author_rank: Regular Contributor
timestamp: April 10, 2017, 12:01:48 pm
content: Having no clear roadmap of what you want to do is the biggest problem.Having a project in mind is nice, but it is easy to get sidetracked.As you said, you end up jumping from idea to idea and from part to part.I would start getting a bear minimum attiny as sleemanj suggested, and using it with a bear minimum circuit and an ISP connector/programmer.A small breadboard would be awesome for that.Start by learning how to initialize it (fuses etc) and burn a bear minimum program to it.You would not even need a crystal for this, but you will get a nice overview of the hardware side too.Then get the full (not summary) datasheet and start reading it from the top, exploring its abilities (registers, ports, pins etc).You will get the full AVR experience, but not get overwhelmed by peripherals and fancy stuff.Then set up a second one, and get them talking with I2C or something. Or perhaps with a shared external SRAM or eeprom chipFrom there you get into application specific stuff, and you will get lost if you try to learn everything. Explore as you need features

author: TiN
author_rank: Super Contributor
timestamp: April 10, 2017, 12:17:37 pm
content: Arduino or whatnot other platform is just a tool. I wound suggest going other direction if you really want to learn digital design things.Which is pick a project you wanted to do. It could be something simple first (for example a temperature/ambient light sensor with serial or USB interface, to store data on your PC).Think what features or knowledge you need to make such a project (surely you can google ton of sensor loggers, all the way from simple 5 component 5$ designs to advanced industrial FPGA-based monsters with own HTTP servers and TFT panels). Writing the code for sake of code I personally find boring and uninteresting, so unless you have much more motivation, learning stuff this way could be quite grim experience.Then search which approaches can be applied to design and make stuff, given what is available to you. You will see that AVR,PIC,STM or whatever have similar families of chips, which can do same stuff, with minor details in implementation and toolkit. Picking ARM however allow you to be me cross-compatible, as you likely to spend less time moving from let's say ATMEL ARM to NXP ARM chip. If you design own schematics, lay out PCB , put everything in nice enclosure - it's an additional plus for you, and extra skill set, instead of being just a XXX MCU programmer.One you get project done and working, after spending X months on debug and making stuff good, you can move on to move complex/feature-rich projects. Or you could loose the interest altogether and focus on analog/RF design for example instead.

author: dimkasta
author_rank: Regular Contributor
timestamp: April 10, 2017, 12:30:22 pm
content: Quote from: TiN on April 10, 2017, 12:17:37 pm++ on thatPlus, it is very fulfilling creating your own stuff. Even simple ones. A small 5x5 board, properly soldered and cleaned, with your name on the solder mask is pricelessEven if it just blinks a led.And it is far more educating (especially when you mess things up) than working with stuff where someone else has done the homework.

author: Ian.M
author_rank: Super Contributor
timestamp: April 10, 2017, 01:03:30 pm
content: An easy way into the hobbyist embedded wold beyond the Arduino is to stick with chips available in PDIP you can stick in a solderless breadboard. The ex-Atmel AVRs are a great migration path from AduinoLand in 'baby steps' all the way - start with a 'board' support patch for the Arduino IDE, dump the setup() loop() paradigm(see reply #40 onwards in the topi I linked in my previous post)and start reducing your dependence on the Arduino libraries so you can get closer to pure AVR-GCC C++ and eventually migrate to either Atmel Studio or the preferred generic GCC compatible IDE of your choice with a supported Atmel in-circuit debugger.You mention some Microchip experience. Their 8 and 16 bit PICs are very accessible to the hobbyist breadboarder. At the low end of the range the core architecture is frankly vile, but it gets better as you move up to the more powerful and newer ones. The 16 bit ones have a GCC based compiler, and the 8 bit ones have Microchip XC8, (originally HiTech C for PIC10/12/16 or for PIC18). Try to avoid resorting to assembler - PIC assembler is very much a hair-shirt exercise - if you enjoyCARDIAC(the Bell Labs cardboard computer simulator), you'll probably love it!So why go PIC? Well the only reason to do so is the vast range of devices and peripheral choices they have, from the low end sot23-6 PIC10(L)F320/322 family which can do useful work ambling along at only 0.0079MIPS drawing an average of under 10uA powered by a single coin cell, boosting to 4 MIPS at about 3/4 mA when you need more 'grunt' or sleeping till a pin change on a fraction of a uA, right up to the dsPIC33EP family capable of doing complex signal processing at 70 MIPS on a breadboard. They are very well documented so its fairly easy to hit the bare metal and control the peripherals at the register level without using Microchip's libraries. A PICkit 3 (or clone if you are on a *really* tight budget), a breadboard, aSparkfun 3.3V/5V breadboard PSUor similar, a home made PICkit 3 to breadboard ICSP cable, a few PICS, preferably with on-chip debug support, and the usual assortment of resistors, LEDs, buttons, displays etc that is typically sold as an 'Arduino component kit' will get you going. You should also have a USB<=>logic level serial breakout cable (3.3V/5V) if you want to do anything with the on-chip UARTs. Initially its as well to choose a PIC that is used on one of Microchip's entry level demo boards so you can easily find example code to get started with, but once you are past the blink a led, read a pot, output a PWM stage, only your imagination is the limit. PIC based projects are often featured in Australia's Silicon Chip magazine and republished in the UK's Everyday Practical Electronics (EPE) Magazine, and although sourcecode is often not available (or of it is its probably FUGLY assembler), such articles can be a good source of project ideas, and some help deciding how powerful a PIC you will need. OTOH they normally don't bother reserving the programming/debugging pins so going up to a higher pin-count device for easier development is often a worthwhile tradeoff.Then there's 8051 derivatives. The Intel 8051 (MCS-51) was the classic embedded processor, beloved of educators from the second half of the '80s onwards. There are still a lot of instruction set compatible ones about in niche markets. I'm barely touching on the 8051 other than to note that a few current manufacturers have breadboardable ones with built-in serial bootloaders as I haven't used one this millennium, so hopefully a current user will chip in here,

author: rstofer
author_rank: Super Contributor
timestamp: April 10, 2017, 01:52:50 pm
content: The Arduino hardware is really a pretty nice prototyping setup. There is no need to use the Arduino libraries and you can still keep the simple download scheme.Next up is mbedhttps://www.mbed.com/en/platform/I really like this platform for speed and the fact that I can use their web based toolchain from any browser, anywhere in the world. Their servers are very fast and downloading to a board is a simple drag and drop of the .bin file. There is no requirement to use their toolchain, many others work just as well.mbed is really an idea, similar to the Arduino but much more powerful, that runs on a lot of different hardware. I use the LPC1768 version but I see that many ST Microsystem boards (and chips) are also supported, at least to some level.The original mbed is FAST and, with the addition of a MagJack, ethernet is provided. There's a fair amount of memory along with DMA channels and some dedicated RAM. A pretty nice platform.

author: Gyro
author_rank: Super Contributor
timestamp: April 10, 2017, 06:24:35 pm
content: Quote from: TheUnnamedNewbie on April 10, 2017, 11:38:51 amWell if that's all that is worrying you, then you really don't have much to worryabout. Most of these boards are really just convenient breakout boards for the microcontrollers in question, just providing basic life support like PSU, clock and comms, either USB or serial. The usual trouble these days is that a lot of people come up from Arduino breadboards and have no clue about analog, let alone RF. It sounds as if you have the s/w side reasonably well covered too.I think you just need to read the i/o specs of a few ICs, 74HC series logic etc. and take the plunge. There's nothing at all difficult about digital hardware compared to what you already know. You'll be fine designing real world I/O (ie. using resistors, transistors and opamps!) and by the time you're handling digital signals fast enough to worry about then you already have the knowledge to RF techniques to cope.It sounds as if you're suffering more of a mental block than anything - time to just take the plunge and ask specific questions if / as they arise.

author: firehopper
author_rank: Frequent Contributor
timestamp: April 10, 2017, 06:31:21 pm
content: Quote from: lem_ix on April 10, 2017, 09:55:09 amonly issue some will have is the software is windows only. and dont forget the psoc 6 that is in the works.

author: exoticelectron
author_rank: Regular Contributor
timestamp: April 10, 2017, 07:12:27 pm
content: Quote from: Ian.M on April 10, 2017, 01:03:30 pmI would agree your block is mental. Confidence is not inspired by using hobbyist tools and a university environment. What you really need is to see how many teenage hobbyists have/were using bare microcontrollers long before Arduino's existed and without any formal training. Then I think you'd see its not a big deal. With mplab + a C compiler, and a copy of K&R 2nd ed., you are on your way. Just do it.

author: ohdsp
author_rank: Contributor
timestamp: April 10, 2017, 07:44:13 pm
content: TheUnnamedNewbie, If you already have a lot of programming experience, and experience with analog/RF electronics, then it should be easier to work with the hardware; as you will not be trying to work out everything at once.In terms of understand digital hardware the essence is it is still all analog electronics. If you pick a simple micro (basic Atmel or Mircochip 8 bit part) then understanding what it needs should be covered in the datasheets and user manuals. All you should need is a power supply and a clock source (crystal) for most low end chips, and a programming interface to get them up and running.My first attempt at embedded programming was on a PIC16F877A using a discrete RS232 programmer built on strip board, with the PIC plugged into a solderless proto-board. It was flaky to say the best but did work. These days a cheap programmer off ebay would most likely be the best option for a programmer, with the proto-board giving an easy platform to play with.The only way to really get into it is to get your hands dirty and be prepared to spend a little money in the process; it's not wasted money if you plan on using it as part of your career. And sometimes you can score free samples of micro's; or you used to be able to from microchip.

author: pyroesp
author_rank: Regular Contributor
timestamp: April 10, 2017, 10:11:59 pm
content: You can get your arduino to program other microcontrollers too, well at least some PICs.As others said, all a microcontroller really needs is power, a clock and a programmer.I like PICs so here's how to connect the programmer to the PIC, spoiler there are only 5 wires :It's that easy. Just give it a try, and if at first you don't succeed, try again. The forum is here to help in case you get stuck.If you think you want to get started with 32 bit MCU, I do recommend the ST Discovery boards. They have an on board programmer so you just have to plug in a USB cable to flash the MCU. (Other manufacturers like TI for ex. do the same).

author: exoticelectron
author_rank: Regular Contributor
timestamp: April 10, 2017, 10:23:40 pm
content: Skip MCU's that need an external crystal. There are zillions that have internal oscillators. Save the PCB space and the time dealing with it. Also, crystals + breadboards = asking for trouble. Actually, breadboards period = asking for trouble. We've finally hit the golden days where you can capture, layout, simulate, and get PCB's made for basically nothing, in a few days, from the USA, with almost entirely free tools. Breadboards are just going to get in your way. Take your design seriously, do your homework, and commit something to fiberglass for $10. The rewards will far outweigh the learning curve, which you will need to deal with anyway at some point.

author: Rick Law
author_rank: Super Contributor
timestamp: April 11, 2017, 05:34:20 am
content: Quote from: TheUnnamedNewbie on April 10, 2017, 11:38:51 amSometimes, sharing experience islike sharing prescription eye glasses. What works nicely for me may not work for you at all. At the risk of "sharing my glasses"...I did my "stepping away from Arduino" via the ATTINY13A and ATTINY85.I am a relatively inexperienced hobbyist. A while back, I did build a bare (no boot loader) ATMEGA 328p (28 pin dip) to work like an Arduino UNO.Learning how to use an UNO as the ISP flasher was useful. Stepping away from Ardunio means one would need some kind of an ISP burner.I needed some flashlights. I got a very cheap (under $5) single-18650 flashlight and decided to do some upgrade. I found theNANJG105c (which uses the ATTINY13A)to be rather suitable along with a Cree XML-T6 led. Well, with the ATTINY13A, the most obvious further improvements would be to upgrade the firmware.I found tons of information out thereon writing drivers for 105c. Best of all, abare-bone flashlight driver source code- it works and it was agood base to learn from. Starting with something working and learn by modifying existing codes is the easiest way to learn in my view.Getting the downloaded simple driver source code compiled and downloaded help me build and understand the tool-chain.I ended up making a dedicated Arduino NANO as my ISP equipped with SOIC clips, and breakout of target MCU pins - and of course some blinking lights for convenience and important status info. So, at that point, I was coding C without a single line of code from the Arduino library, and with tools that can stuff the result down to the Attiny 13A using my NANO-ISP.The flashlight with the NANJG 105C was transformed into an "AVR application development education tool" at this stage.Having custom flashlight with my personal brightness setting is of course good, but more fun things can be done. Finding the Attiny 13A limiting, I moved on to the Attiny 85 with a lot more space and capabilities. Needs a bit of pin-bending to get the Attiny 85 on to the 105c -again with lots of info out there about how. With the added capability, I can temperature-sense using Attiny 85 built in temperature-tied ADC to throttle down to keep the LED from over-heating.By then, I feel very comfortable working with the MCU outside Arduino environment. I even learned to "wear balance" the EEPROM so I can switch brightness on the LCD tens of millions of times on the Attiny 85 -again, learned that from flashlight firmware information out there.Attiny 85 is big enough to actually run some of the Ardunio library. So of course I have to try it. I got that to run my 20x04 LCD with I2C showing the time from an I2C clock. So, I crossed the Rubicon and came back. Now I feel comfortable working the the MCU with/without Arduno boot-loader or library.In the end, I have a handful of 18650 flashlights with the NANJG 105c driver using my own custom code (no Arduino library). And back on the Arduino side, I have a keyboard handler running ATTINY85 doing input handling and communicating back to a "master MCU" via I2C.I am still tied to the AVR at this stage, but I am freed from Arduino, and I feel should I want to switch to something else, I know what additional hardware and knowledge I may likely need.Again, this is like sharing my prescription eye-glasses. What works for me and what counts as great results for me may not be what works for you. But,I hope this input helps with your quest.

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: April 11, 2017, 05:58:04 am
content: I want to thank you all for your replies. They made me realize that I perhaps overestimated the complexity getting my own microcontroller to work, and through doing so have stopped myself from trying. Once I'm finished with my current project, in which I will use an arduino still - It's a project for someone else and I want them to be able to easily replace/update the hardware - I'm going to try and use a separate micro controller for a small project. I'll have to see with what I start, I have one or two ATTINY laying around, but I'll have to look at what is easiest.If I get to it, I might put my experience into a blog, who knows.Thanks again for the help guys! I have a lot of things to look at now, and some nice places to look at for help.

author: dimkasta
author_rank: Regular Contributor
timestamp: April 11, 2017, 07:03:38 am
content: Another way to get some more insight about the mcus and check out what arduino hides, is an assembler tutorial.You don't have to follow the code, just see the concepts that they have to tackle with.Very eye-openingSent from my HUAWEI NXT-L29 using Tapatalk

author: jamie297
author_rank: Contributor
timestamp: April 12, 2017, 05:57:07 am
content: Huge thanks to all the replies on this thread for encouraging me to stop messing about and just order a PIC.Sometimes need a kick to stop thinking about projects and just start them.Noob forum questions on the way no doubt!

author: Luminax
author_rank: Regular Contributor
timestamp: April 12, 2017, 07:32:21 am
content: Quote from: pyroesp on April 10, 2017, 10:11:59 pm+1I'm mainly using PIC18F nowadays for its various embedded peripheral. Capture Compare PWM, ADC/DAC, Gate-able 16-bit timers, and some even have direct LCD drivers, the lots!.With the latest version of MPLAB X IDE is the capability to "Generate Code" using the MCC (MPLAB Code Configurator) so most of the "early setups and configuration" are done through an easy to use interface code generator. Additionally, the codes are formatted for a "State Machine" base configurations which is one of the useful programming method for small-memory sized MCU.16-bit PIC24 and 32-bit PIC32 looks interesting, too, with the abundance of low-cost development boards.

author: pyroesp
author_rank: Regular Contributor
timestamp: April 12, 2017, 07:26:52 pm
content: Quote from: Luminax on April 12, 2017, 07:32:21 amAnd I'd like to add that you can get a few PICs for free from Microchip.

author: Ian.M
author_rank: Super Contributor
timestamp: April 12, 2017, 07:45:00 pm
content: Yes, in many countries, but you cant use a free email address to register. Apparently some dishonest idiots were making multiple registrations, ordering sample PICs and EBAYing them still in their Microchip antistatic bags with the samples label on. This caused Microchip to clamp down a long while back.

author: Luminax
author_rank: Regular Contributor
timestamp: April 13, 2017, 07:40:42 am
content: I did get some free sample from Atmel when they were still "Atmel", and some from Microchip, I think it was 16F, the smaller ones without any big-bang peripherals.I remembered Dave's video about PICKIT2 comparison against PICKIT3 and I wish I have had experienced the PICKIT2 but eh, PICKIT3 works for me.Now... to figure out how to properly get this damn ICD 3 working...

author: Docholiday
author_rank: Regular Contributor
timestamp: April 13, 2017, 10:36:21 am
content: I have learned so much on this thread.Thank you to every single one of you that replied. I truly appreciate your time and effort taken in your responses.Sincerely,Nicholas