Path:
Home =>
AVR-EN => Arduino as drug
(Diese Seite in Deutsch:
)
Arduino's malediction
People are creatures of habit: if you are addicted to something, no one will be able
to get you away from that - no one else but you. And: even if that addiction leads to
nonsense, you'll stick with it.
A side effect of addiction: the view on the world narrows more and more. If something
does not function with what you are addicted to, is simply unusable. Or you walk on
complicated and unnecessary sideways to get it going.
In the last years it became more and more popular to chain yourself on a small PCB.
With some crazy side effects:
- This piece of PCB determines in which language we speek with microcontrollers.
The language is not a simple translation tool any more, but narrows down our view
on controllers: what isn't in C is not worth it (not because C is any better, but
simply because I cannot understand it, a side-addiction of Arduino).
- The PCB's properties determines the direction of what we do and think. If your
hardware needs 32 pins to function, the PCB does not provide enough of that. Then
we skip the project and think about something else.
- The PCB narrows down our attention: from self-making down to blind copying.
You do not have to understand what you do any more. You are more and more into
searching for libraries that do what you need rather than creating your own
solution for that. We'll develop to slaves of libraries and only simply apply what
others have used their brain on. You can call that intellectual degeneration, if
you like.
As with every good drug, the addiction carreer starts at a smal price: between twenty
and fourty Dollars for an Arduino. Compared to a naked ATmega328, which costs around
10% of that sum, a tremendous surcharge. Is a 16-MHz-crystal, an extra-cheap socket,
a standard voltage regulator and a few resistors and capacitors worth that? But anyway,
you'll get all you need to get addicted to that.
The examples that are delivered with the package function well. All you need is to read
and follow some help pages. You'll need to know near to nothing. Probably knowing some
about that would even stand in your way. And that is the starting point for addiction:
you are teached that you have to know nothing about those controllers to get
pre-fabricated stuff to function. Like a unseeming child you'll have to avoid learning
and knowing, avoid anything that does not do immediately do what you expected it to do.
Success with zero efforts, please.
If only the language C would not be necessary. While some work on languages that even
replace it with simpler-to-understand language constructions (is "Make PB0
output" instead of "SBI DDRB,DDB0" really simpler?), in the meantime
you'll have to learn C. If you want to use even simpler languages such as Assembler,
an extrem set of hurdles have been placed in between you and the controller. You
already understand why Assembler is more complicated than C? Just because of the
Arduino designers. If you own an ambos, a precision mechanic's cripper might not be
the appropriate tool.
And then you start searching for libraries. These are pieces of software that others
have programmed. Those can be used to replace own efforts, understanding and knowledge.
Those libs are available for each and everything, and enable to perform things without
having to understand what those do and how they work. Ideal for preventing people from
learning and knowing something about the controller they apply those libs for. Usually
they'll ask you "Why should I re-invent the wheel?" instead of learning what
they do. This hides behind the real goal: do not bother me with things that I do not
understand, and that I want to avoid learning about, because I'm rather too lazy to
switch my own brain on. That breeds even more of those not-understanders-but-proud-of
types and click-a-few-buttons that bring all-things-together, that the world is already
full of.
Of the 28 pins of the ATmega328 the designers of the Arduino have left only twelve for
individual use. This is less than half. Those who would need 13 or 15, or even 32 (like
in the case shown here, can not be
solved with an Arduino. He simply skips the idea. Or he does it like shown in the
German computer paper c't: build a serial pin extender with an I2C bus IC. This is
beyond any technical reasonabliness, because with eight data pins and four control pins
up to 128 bits can be achieved in a fast and simple parallel mode with a 4-by-16 decoder
and 16 ICs 74HCT373, as has been demonstrated with an ATmega8 on an unpublished website.
Instead of choosing that simple solution the I2C is slow, requires unnecessary overhead
and is inappropriate for that purpose. And: the Arduino user might not be aware that
there are a lot of 40-pin controllers such as ATmega16, 32 or 324 on the market, that
can solve the problem immediately and not having to go on sideways. That shows how the
Arduino reduces the view: it narrows down the attention of the whole world to an
ATmega328. Even though you can solve the missing pins by using a pin extender and the
I2C library, you'll end in a one-way-street.
My tip: drop your Arduino into a trash can, order an ATtiny13, solder a 10 k resistor
to its RESET pin, connect the RESET, the SCK, the MOSI and the MISO pin to a 6-pin
plug and connect the 6-pin plug to an ISP programmer hardware. And learn how you can
program the port pins, the AD converter and the timer in the ATtiny13. Without any
use of libraries, and only equipped with the device's data book.
This here helps in understanding the
controller's internals and how to use the controller and its hardware. If you've
absolved the complete or half of the course, you'll be clean from the drug and you
won't miss the Arduino. Arduino's misediction will be blown away and does not bother
you any more. You'll see that a whole new world opens up. And that you are free
from that drug.
To the top of that page
©2020 by http://www.avr-asm-tutorial.net