
Chip Hall of Fame: Atmel ATmega8 - retSava
https://spectrum.ieee.org/tech-history/silicon-revolution/chip-hall-of-fame-atmel-atmega8
======
ceocoder
I have fond memories working on Atmel chips, started with 89C52 and graduated
to ATmega8 later on. It was such a fun experience building "medical devices"
with these chips. First successful project was a commoditized Vibration
Perception Threshold meter, ones made by bigger companies used piezoelectric
crystals costing upwards of 10s of thousands of rupees - I built one using
relays and 89C52 to create a square wave of varying frequency to change
vibration frequency. My then girlfriend (now wife :))'s project was EKG wave
generator, essentially a device that simulated signals out of a human body
that one can use to test EKG devices.

Just the mere act of programming one was amazing, you'd have to use SDCC[2]
(small device c compiler) to convert your C code to assembly that 89C92
understood, in process I built my own chip burner and use some combination of
PonyProg[3] to burn it. We went through _many_ chips due to mis-configured
serial port connectors but it was so worth it.

[1]
[https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2992204/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2992204/)

[2] [http://sdcc.sourceforge.net/](http://sdcc.sourceforge.net/)

[3] [http://www.lancos.com/prog.html](http://www.lancos.com/prog.html)

p.s. I air-quoted medical devices to make it abundantly clear that whatever we
made was never ever ever used to diagnose any patients.

~~~
jondubois
I remember programming the Atmel ATmega8-16PU at university in C with AVR
Studio (that was before Raspberry PI). We had a team project where we had to
build a Morse code receiver and decoder from scratch (circuit board and
everything); our device had to intercept Morse code from radio waves on a
certain frequency and output the message on a standard computer in human-
readable ASCII text via a serial port. My team was one of the best and our
device was able to intercept and decode the message. It's amazing what 3
people with complimentary skill sets can do from scratch. It's a really good
chip too I have to say.

------
filomeno
I used to do -and still do- a lot of work with AVRs for hobby projects. I find
them an awesome piece of technology, allowing you to start working on
something with only a breadboard and a couple of wires, in contrast with ARM
based ucs where the basic setup is not simple at all.

However, in the last years, following the Atmel acquisition by Microchip, the
price rise on suppliers like Mouser started to make them look unattractive.
But I still prefer the 8 bits ;-)

~~~
lmilcin
I agree, but I would say that for personal projects, I find the difference in
price quite irrelevant. What's typically important is how the part fits the
application.

For example, recently I found that the fumes extractor in the kitchen of the
flat I rented failed. The PIC on board got tazed with 10V from a broken PSU. I
fixed the PSU (replaced cap and regulator, added TVS diode for protection),
but the programming on the PIC was lost.

So I found that there is one AVR with matching pinout that I could use in
place of the PIC. Thanks to AVRs being so easy to program I could program and
test it in an hour or so, and even added some extra features.

I do other projects where I need more power (Cortex M3/M4), but AVR is hard to
beat where it comes to how quickly you can get simple things going.

~~~
mschuster91
Out of curiosity: what features did that fumes extractor have?! Mine has just
a plain old switch to control the fan in 2 speed modes, and another switch to
control the light...

~~~
lmilcin
3 speed modes, light, and some diode indicators.

Previously there would be one switch to control light, 3 switches to control
speed modes and extra switch that I don't exactly know what it did -- probably
it controlled some kind of timer.

The 3 switches that controlled modes were 0/1 (change speed to 1 if anything
else than 1, turn off if it is currently 1), and 2 and 3 which would turn on 2
and 3 speed mode.

I have added a 500ms long press to 0/1 switch which means that whatever is
happening it turns off both light and fan at the same time. You don't have to
turn off light and fan separately and you don't have to press 0/1 twice to
reduce the speed to 1 and then to turn it off.

As it was sometimes difficult to figure out which speed it was on without
looking at the indicators (on the side and not on the front of the extractor)
you never knew you had to press it once or twice which was quite irritating.

~~~
nerfhammer
now, add a motion sensor so the light comes on when you stand near it and a
smoke sensor so that it turns on automatically when you start cooking and
stops automatically when all the smoke is clear.

~~~
lmilcin
The object was to place a new chip into an already existing PCB and then
program it to work with the existing parts, switches, and so on.

------
garaetjjte
AVRs are great for small embedded applications (I think only 8-bit
architecture with good compiler support), but I don't get why Arduino is so
popular. Poor "IDE" with some horrible C++ preprocessor, heavy libraries
abstracting important hardware details, and no onboard debugger.

~~~
bjt2n3904
In short, the Arduino was popular because how bad everything else was. Travel
back ten years, and look for an embedded development kit. This is what you'll
find.

Average cost is gonna be about $100 for the board. Oh, did I mention you'll
need another $80 for the programmer? It only runs on Windows XP, by the way.
Closed source custom USB driver that no one understands. Wine chokes out, so
no running it on Mac or Linux. PS: The programmer was the "student edition".
You'll only be able to program their low end series of chips, and hardware
debugging is disabled.

I forgot to mention. You're limited to the free assembler / IDE, that only
allows you to use 4k of space. If you want to use any more, you need to
purchase a license for $250. And by "integrated", I mean no using your own
makefiles or editors.

There's no "stack overflow" style community, either. Your support is limited
to poorly written app notes behind a crumby web portal.

And then the Arduino came out. $20 gives you the board, and programmer. No
licenses. No drivers. Open documentation. Works with a fork of GCC. Want to
use VIM and Makefiles? An Eclipse based IDE? Work on a Mac? Comes with a
vibrant community, a repository of examples, and inexpensive addon hardware.

TL;DR - Want your product to die? Force me to use your crumby closed source /
"evaluation period" tools from the 90's, lock everything away behind NDA's and
web portals, and provide no support community for your product.

Looking at you, FPGA manufacturers. Does your revenue come from selling chips,
or selling crap development environments?

~~~
sorisos
I have the same experience with FPGA development boards. I wanted to learn
VHDL but gave up after 2 days with the "getting started" tutorial.

~~~
lmilcin
The assumption here is that if you go for FPGA design you should already have
at least some knowledge of embedded applications.

FPGA development process is aimed squarely at corporations and rightly so.

There is very few hobbyist projects that really require FPGA. Most of cases
where I saw FPGA in use was not because it was needed but because the person
didn't know how to achieve the result using other, more appropriate means.

~~~
bjt2n3904
> FPGA development process is aimed squarely at corporations and rightly so.

Sure, I wouldn't burn too much money advertising FPGAs to makers and hackers.
But I wouldn't design my platform to exclude them.

The accessibility and hackability of the Arduino and the Raspberry Pi helped
create the IOT field (for better or for worse). The only reason the Raspberry
Pi exists is because there was an insider at broadcom that was able to
convince them to sell a smaller quantity of chips.

> We were able to get our foot in the door to discuss buying chips in much
> smaller numbers than they usually sell (you’re right about millions of
> chips) because Eben works there and was able to get access to the right
> people, who were right on side once we had explained the goals of the
> charity. [1]

Alienating and raising the barrier for smaller players hinders business
development. What cool projects would exist now if FPGA vendors weren't so
stuffy?

[1] - [https://www.raspberrypi.org/blog/qa-with-our-hardware-
team/](https://www.raspberrypi.org/blog/qa-with-our-hardware-team/)

~~~
lmilcin
I think FPGAs are not like general purpose MCUs.

I think the comparision is like between CPU and GPU. GPUs are fantastic at
solving some of the problems but you don't see people rushing to use GPUs in
every computing application.

Chances are, if you can implement it on MCU you will want to implement it on
MCU because:

1) you need an MCU anyway either separate or FPGA based one

2) FPGA programming is sucha a hassle and not because of the tools but because
it is genuinely hard

3) learning FPGA development well is a major effort as it requires different
type of thinking. It is much more of a change that going from one programming
language to another as entire concept of what is a program changes.

4) if you need more power, it is typically easier to step to more powerful MCU
than to FPGA.

As I understand, we need some number of very specialized people that can
invest the time to learn hardware design on FPGA and the rest is better off
spending that time thinking of fun MCU-based projects:)

~~~
user5994461
A GPU is much closer to a CPU and a MCU, than any of these is to a FPGA.

VHDL is a different thing entirely from any programming language. It's not
ranked as a programming language by the way. It might be easier to learn if
you don't know any programming but know how to make integrated circuit boards.

------
elijahparker
It was the original AT90S8515 that really grabbed my interest and launched me
into embedded programming (when I was about 15 years old). Prior to that I was
using the Basic Stamp, with it's incredibly limited and slow instruction set
(yet a ridiculously high price). Then I switched to seemingly impressive
BasicX with a far more powerful instruction set, though still Basic. That's
when I realized the BasicX was really just an AT90S8515 with an interpreter so
I learned C and programmed it directly at just a few dollars per chip -- it
changed everything for me! Not only did I have the most powerful MCU I had
ever used, but it was also cheap enough to leave in projects.

------
retSava
It's interesting that not only the later platform - the Arduino, which started
out with AVR and aimed at simplifying programming the devices - but the AVR
chip itself started out with the goal of simplifying the process of using it
(programming, tools, ...).

------
thowarray
Great microcontroller, shitty article.

~~~
pietrofmaggi
Wikipedia page for AVR[1] is much better!

And Atmel released in 2008 a video with the two co-creators of the chip
describing its history[2].

[1]
[https://en.wikipedia.org/wiki/Atmel_AVR](https://en.wikipedia.org/wiki/Atmel_AVR)

[2]
[https://www.youtube.com/watch?v=HrydNwAxbcY](https://www.youtube.com/watch?v=HrydNwAxbcY)

