Hacker News new | ask | show | jobs
by sobering 4800 days ago
Does anyone have any suggestions for books/learning materials related to the pre requisites mentioned in the article, specifically Microprocessor programming? I've tried to find some in the past but having no prior EE experience I find even some of the basics challenging.

I have experience with C, but don't really know where to start with the lower level stuff.

I'm thinking I should start with a simple book like Electrical Engineering 101 (http://www.amazon.com/Electrical-Engineering-101-Third-Schoo...). Once I have a grasp on some EE basics I might be able to step into the Microprocessor programming a bit better, knowing a bit of what's happening behind the scenes.

Any thoughts/suggestions?

5 comments

The "lower level stuff" you're asking about here isn't exactly EE stuff, it's more about microprocessor interfacing. The kernel driver is getting data from userland, but now it needs to be massaged and placed into appropriate registers in the processor to get it to do something, or push the data out to a helper chip where it can do something (like sending and receiving mouse coordinates over USB to the little chip inside the mouse, for example).

So one one hand you need to understand your host processor (and it's constellation of helper chips) inside and out. Some modern SoC systems like the ones in smartphones have everything built into the same chip, so you wind up combing through 5,700 page Technical Reference Manuals like this one for the Freescale i.MX6:

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQ...

Or, in the case of more generic micro-based systems like an Arduino or something, you're reading datasheets for other little chips and figuring out how to interface them to your host's kernel.

But yeah, knowing how to wire up a transistor or LED to a processor without cooking it (or your power supply) is a good thing. You can learn a lot from taking apart other people's projects and seeing how they do it. Common patterns start showing up.

In addition to reading a book on basic EE, buy an AVR-based Arduino. From a perspective of professional EE/embedded developer Arduino may seem limited, but there is loads of information on "how to connect X to Arduino".

If you are specially interested in embedded programming, try to start using avr-gcc directly- you'll be forced to learn lot of low level stuff which is hidden by Arduino IDE.

I'm glad you suggested what you did because that's exactly my current setup.

I have an ISP and Arduino. I yanked the AVR chip off the Arduino and stuck it on a breadboard. I just found it difficult to do anything due to my lack of EE knowledge. I could understand the programming basics due to past experience, but had no clue what was going on under the hood.

I think I'll read that EE book and then continue on the path I'm on.

If you get the basics of assembly programming, and read any periferal's datasheet (get a simple one), you'll notice that there is protocol for accessing the periferal. If you can understand that protocol and know how you can write C code that conforms to it, you know "microprocessor programming".

If not, well, you may need to learn assembly, C, or something else entirely (but probably not EE), and the experiment will help you discover what exactly you need.

You can probably do just fine with what you know.

One project that might help out is to re-write the 8150 USB network adapter project. The devices that have this chipset are easy and cheap to find and the data sheet is easily available. There's a PCI version of this chip, the 8139, too. The USB project would be easier since you're passing URBs back and forth. The LDD3 book and the data sheet is more or less all you need.

I'm trying to understand what you mean by "Microprocessor programming." Do you mean something like Assembly language? Or do you mean Microprocessor design?

I'm wondering if I might be able to help out, but I'm not sure I understand the question. I'm an EE with a lot of digital design background and some software.