4 ms·
This is very much the case. Arduino gives you a nice board with a decent power circuit, clock circuit with crystal oscillator, strips of headers to plug wires i
by charlesdaniels 6y ago
This is very much the case. Arduino gives you a nice board with a decent power circuit, clock circuit with crystal oscillator, strips of headers to plug wires into, a USB connector, UART to USB adapter, and often other goodies. The exact same MCU, the ATMega328P can be had for $2.08 each[0], or less if you buy in bulk.
For your $2, you get:
* An internal oscillator which lets you run without an external clock circuit (typically limited to around 8MHz, and can cause clock drift, so not good of accurate timing is important).
* Hardware UART interfacing logic
* Hardware SPI interfacing logic
* Hardware I2C interfacing logic
* Several ADCs
* 23 GPIOs
* 2kB data memory
* 1kB EEPROM
* 32kb flash memroy
There are other microcontrollers out there, each with their own trade-offs. I personally like AVRs, as they have good quality open source compilers, you can mooch off the Arduino community for libraries[3], and in-circuit programmers can be had for cheap[1].
If you want to learn more, I suggest this article[2].
0 - https://www.mouser.com/ProductDetail/Microchip-Technology-Atmel/ATMEGA328P-PU?qs=K8BHR703ZXguOQv3sKbWcg%3D%3D https://www.mouser.com/ProductDetail/Microchip-Technology-At...
1 - https://www.adafruit.com/product/46 https://www.adafruit.com/product/46
2 - https://www.evilmadscientist.com/2007/using-avr-microcontrollers-minimalist-target-boards/ https://www.evilmadscientist.com/2007/using-avr-microcontrol...
3 - https://github.com/oshlab/Breadboard-Arduino https://github.com/oshlab/Breadboard-Arduino
- 05 6y agoOr you could buy a 32-bit ARM Cortex-M0 for 50¢ (STM32F0 series)
- rcxdude 6y agoThis. AVR chips are not a great cost comparison point anymore, they're very expensive, especially for the speed you get.
- kaoD 6y agoI'm sure you're already aware, but being bigger is actually a benefit for the beginner hobbyist market. There is a DIP ATMega328P version and in fact it's the one used on the Arduino UNO. It's also socketed! You can program it on the UNO, take it off, and it's good to go to be plugged into a breadboard, soldered standalone on perfboard, etc. and replaced with a new one.
- rcxdude 6y agoTrue, but I think that there's a bit of an unreasonable fear of SMD among hobbyists. Large SMD components can actually be easier to solder than through-hole (and there's no shortage of break-out boards for breadboard prototyping).
- charlesdaniels 6y agoIndeed, for educational use cases and hobbyists, there are tons of resources available for the AVR. Being able to buy it in a DIP package is ideal, since it really lowers the barrier of entry in terms of skills and tools required. There are also tons of libraries and code examples both for AVR itself and for the Arduino platform.