Sign in to follow this  

hardware programming.. how to start?

This topic is 2662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am pretty comfortable programming software at High level, for windows and stuff using C++, java, c#.
But I have very little idea about hardware programming. I want to learn about writing code to run on the hardware. firmware programming. I've read some stuff online and mostly it is done using C.. is that correct?
Can someone tell me a good book or website where I can learn about hardware programming.. for example how a TVs remote control might is programmed.
thanks!

Share this post


Link to post
Share on other sites
If your talking about Assembly code then i suggest you take a look at MIPS assembly code for some examples.
Some compilers can keep assembly output for you however.

These types of assembly languages are usually more concerning with Electrical Engineering majors, as it's pretty low level stuff. As a CS major myself I didn't see it maybe more than a few classes. but ya.....there ya go lol

as far as books.....eh not sure of any. There are a few tutorials out there, I own a book called Computer Organization and Design that goes into detail, then what you would do is run the code on a MIPS simulator.

But honestly....I wouldn't "personally" concern myself with learning low level code like that unless you plan on doing Electrical Engineer or Computer Engineering.

Share this post


Link to post
Share on other sites
What you want to look into is microcontroller programming.

A microcontroller is basically (usually) a single chip containing a complete computer (RAM, CPU, ROM, I/O, etc). Most microcontroller manufacturers sell "development boards/kits" which can be hooked up to your PC via USB or RS232. Using such a board it's very easy to start coding and debugging programs (usually in C or assembler) running on the chip.

While studying (electrical engineering) I used a number of different microcontrollers, one of my favorites were Texas Instruments MSP430. Very easy to get stuff running on it and it's fairly cheap. There might be some more user friendly packages out there, I don't know.

If you want to use it for actual stuff beyond just running code on it through a debugger, you'll also need some knowledge about basic electronics and low-level computer systems.

If I were you I'd pick up a book like Structured Computer Organization (Tanenbaum) together with a book about simple electronics (digital circuits, ohm's law, etc :)).

Share this post


Link to post
Share on other sites
You might also want to learn about FPGAs (Field Programmabgle Gate Arrays). They are programmed using HDLs (Hardware Description Languages) like Verilog and VHDL. In these languages you actually describe digital circuits at the digital gate level. You can even write your own CPU in Verilog and then use your source code to implement your CPU in an FPGA. The chip can be reprogramed any time. Just google "FPGA" for reading material. http://www.fpga4fun.com/ is a very nice introductory site.

Share this post


Link to post
Share on other sites
There are lots of interesting ways to get into that type of programming. Probably the two most approachable are Microcontrollers and Homebrew game development for older systems.

Arduino's are very approachable and all-the-rage it seems, there are plenty of neat and more-powerful ARM-based systems from Olimex and others (SparkFun has an excellent selection of all kinds of systems) -- The majority of embedded playthings seem to be ARM based, but there are lots of smaller and/or oddball architectures to play with -- PIC, AVR, MSP430, 8051, z80, 68k and many more. The ones I really want to play with right now are the PIC32 (which is MIPS-based, you don't see much of those any more) and the XMOS, which is a really neat, cheap, event-driven multithreaded processor which comes in 1, 2 and 4-core variants and can communicate with other XMOS chips for up to 64 processors.

For homebrew, systems like the Gameboy, Gameboy advance and Nintendo DS are neat little systems that are now well-known -- its quite easy to make things happen without any libraries at all -- just by reading the docs and poking bytes into the right places. The GBA in particular is a good choice -- enough SPU power that you can do most stuff in C, enough interesting hardware to keep you busy, a couple wonky screen modes (always fun for a little Assembly language fun), PWM-based sound (fun again) and ARM assembly is pretty pleasent to work with. For something a bit more powerful you could try out the Didj too -- its less understood and no emulators exist yet, but that's half the fun (then again, probably too much for a beginner).

Share this post


Link to post
Share on other sites

This topic is 2662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this