6 ms·
> However people who are just learning about programming electronics don't really want to have to figure out the joys of GPIOA3 being shared with the ADC when t
by misnome 14y ago
> However people who are just learning about programming electronics don't really want to have to figure out the joys of GPIOA3 being shared with the ADC when trying to attach an LED.
The Arduino and similar products (microcontrollers right down to PICs) seem interesting and appealing, but I'd much rather approach the issue from an EE perspective, and the thought of learning to do this like in the article - with the chip itself on a breadboard, seems much more appealing.
It's just a very intimidating space, and I have no idea how to approach it iteratively without jumping straight in to something like the Arduino, which presumably hides a lot of the complexity. I've looked at Sparkfun and would love to understand enough to start using some of the cool looking components on it.
Do you have any insight or suggestions for a path to learning this?
- mercuryrising 14y agoWith new microcontrollers, almost everything has moved onto the chip itself. The "EE" perspective (the surrounding circuitry) is little more than following the datasheet and observing the rules for routing. Sparkfun is awesome not only because they sell cool things, but because they release many of their schematics, check this one out - https://www.sparkfun.com/products/11113 https://www.sparkfun.com/products/11113 (click 'schematic' or 'eagle files' (if you don't have eagle, you'll need that too - http://www.cadsoftusa.com/) http://www.cadsoftusa.com/)). You can see all the pieces needed to make an 'Arduino'. A voltage regulator, a reset switch with a pull up resistor, some filtering capacitors, and a crystal oscillator. That's it. If you make a board yourself that runs off of a Lithium battery, you don't need a voltage regulator, might not need a reset switch, you can use the internal oscillators, and you have almost nothing outside of the microcontroller. It's really amazing. I don't think you meant 'EE perspective' this way, but if you meant getting closer to the machine code, one thing you can do and still be able to do everything nice is rip open the Arduino source code, or re-implement the functions they provide. Try rewriting digitalWrite(PIN, STATE), or analogRead(PIN), and see how many instructions those functions need.
- chas 14y agoThe Arduino hides a lot of its complexity through its libraries and software interface, but it is open source! This means you can learn a lot about embedded programming (that might be difficult to get from datasheets) from its source code. For instance https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/wiring_digital.c https://github.com/arduino/Arduino/blob/master/hardware/ardu... is a pretty good resource for learning how to do i/o on a microcontroller. In addition, the arduino environment is still running your code through avr-g++ so anything you can do on an ATMega328P (or whichever chip your Arduino is using) you can do on an Arduino by using the low-level interface directly. This means you can iteratively transition from completely relying on the Arduino to coding from scratch. Open source circuit schematics mean you can build your own circuits based on the Arduino and have a known good test platform as a reference.
- MetallicCloud 14y agoI would recommend getting yourself a Nerdkit (http://www.nerdkits.com/ http://www.nerdkits.com/). It gives you the bare essentials to get started on, and has a lot of content on their site if you get stuck.