So i've always been very interested in Electronics, but eventually ended up pursuing a career in Computer Science. Anyways I have the programming portion down pretty well.....but my problem is , is that I want to get into the hardware of microcontrollers.
I've done some research on some kits and such, but.....how would I go about "building my own".
Like not purchasing a pre-built board kit, but actually getting the microcontroller.....soddering it in...and it's components or is that probably not a smart thing to do?
BTW any suggestions as a good MC to start out with? I've heard alot about the TI ARM processors among various others but I don't know whats good. I would preferably like to start with one that uses straight Assembly, I can deal with a C compiled one....but i'd rather not lol
Think breadboard, not solder. I have been going the C route with Arduino and compatibles. I will defer to others about the best for assembly; it has been years since I did that on a microcontroller and then it was Intel 80xx based stuff. I just got one of the TI lauinchpads also, but haven’t done anything with it yet. But it will also be C. What kind of project do you have in mind? What are you going to interface to?
oh yeah; I don’t think any choice will preclude you from using assembly. With the Arduino, for example, the IDE just makes it easy and pretty seamless to compile and download a program. But you could use Amtel’s AVR assembler, create a HEX file and download it instead.
Ya see i’ve written assembly but nothing more for just the sake of learning it, and it was x86 stuff.
Regardless Im not looking to do anything fancy, mostly just a “Monitor” to maybe an RSS feed . I was looking into maybe updating a website with a snapshot taken every xxxx Amount of minutes to a website. Something simple but a good project like that. So i’d basically just need to be interfacing with Sensors, or a Servo aswell if I wanted to move the camera or w/e (which I prolly would)
If you were dead set on assembly, low/mid range PICs have 32-35 assembly instructions. I prefer JAL myself as it is a bit more familiar to me in comparison to BASIC, and it’s free. Microchip offers free development environment for assembly. I have no real world experience with constructing a project, as yet.
At the risk of going on a tangent, I don’t think assembly will gain you much in that sort of project and will likely complicate things. This is coming from the perspective of someone who has written reams of both assembly and high level code over 30+ years. The kinds of things that I needed assembly for were stack manipulation to manage pseudo mult-tasking, writing self modifying code (rarely a good idea, but some Intel chips required the port number for output operations to be in the code, so if you had several identical devices and wanted to share code, you had to modify the machine code on the fly), interrupt service routines and writing code that had a hardwired address in memory. Some early versions of DOS had interrupt based system calls that were easier to do in assembly. But for general control flow logic, math and data processing, give me a higher level language! C seems to have been embraced most widely by hardware vendors and there is a compiler for almost every chip that will include exteensions to let you do things that might otherwise require assembly. Also, functions that do various math, data conversion, imaging, etc, operations are often easy to find in ANSI C form that will work on nearly any environment. I would strongly urge you to consider learning C or becoming more proficient at it (from your earlier comment I assume you have some exposure).
Ok well I mean C is fine, but what about actually choosing the hardware and doing the soddering myself? I need to find a guide or something about how to get started on that.
Anyways with that being said, do you think a sensor/monitoring program would be something a beginner/nub like me could do? If so any suggestions on where to start.
And ya I have 5 years exposure with C so I know it pretty decently.
Well, I am biased towards the Arduino because I have been using it. It is easy to find Amtel chips with the bootloader already burned in and there are lots of kits available if you want to solder. I still suggest breadboard first or maybe a kit like this:
IF you go with Arduino. It will be really easy to do the servo and temp sensor you mention. But I made the “IF” big and bold because the eventual project you mentioned with video and web would be difficult on the Arduino (actually most microcontrollers; the Propeller might be an exception).
Ya i’ve heard good things about Atmel, but isn’t there something like PIC32 or something thats supposed to be good?
Either way I have e-books for both to just kinda help out. Ill take a look at the kits though! and isn’t there like a tutorial or something on this site, or any website recommendations for getting started with this stuff?
I honestly recommend getting one of those pic18f’s first then moving on to the dspic. Though many may say its a bad decision. I found the learning process a very good one.
Can I build my own development board to what language should I use. To answer your question yes you can. But it would be better if you start with a system like arduino or picaxe or basic stamp and use them to learn what is involved in designing them. What the pins are used for and what layout would be best for your own design. These tools are very good for that. Once you understand the particular micro used in those systems you could go on to design your own board with a pic or avr. I think thats pretty much how most people have started. Well I know I did at least.
I started with a few pic I started with a few pic chips and a cheap programmer. Then I bought 3 arduinos, then I bought 10 more PICs. In the end they are both very very nice. I never had any issues with either one. I think PICs are great if you really want to build circuits from scratch, they have a lot of chips with varying prices and features, and they are almost always available.
I would recommend the arduino for higher level projects which include a computer. Arduino’s main strength is it’s flexibility and convenience. It’s much much easier to go from idea to prototype using an Arduino. For example, I wanted to be notified of incoming emails and instant messages while I was away from the keyboard. I took out an arduino, hooked up a RGB led and wrote a short program to wait for values on the serial port and change the color. I then wrote a windows program that hooks FlashWindowEx and sends rgb commands on the serial port where the arduino listens. I can now spend more time around the watercooler without missing out on all the funny video links that my friends send me on IM. Now… the problem is I want my arduino back for robot brain duty… and my friends want one of the cool glowing gizmos too. The problem is … finding the arduino com port can be tricky to do automatically. This is where a PIC like the PIC18F13K50 can save the day. Since it’s usb capable, I can make a much cheaper, smaller device for my friends, and it will be more reliable and user friendly.
After all, the world needs washing machines. Kidding - people do amazing stuff with PICs. I just offered up the Arduino because that’s what I know and I picked it up really quickly. Hopefully someone else will come along and extoll the virtues of the PIC (the one I hear the most good things about is the PICAxe) to help you decide.
BTW, the Amtel line of AVR processors matches up pretty well with PICs on features (there is built in USB on some, for example) and to some degree prices (the cheapest Amtel is almost double the price of the cheapest PIC, but both are under a dollar) and if you poke around on the net you can find info on how to use Arduino code on the whole line (or you can use straight C or assembly using Amtel’s free IDE). I would not rate either as being more reliable than the other.
I have used both Atmel and Pic controllers, and find that I like the Pics a little better. As far as getting started on the hardware end of thing, get a breadboard! Once you have your circuits working, then think about doing some soldering. I would also recommend trying out a lower level processor to begin with. I use the Pic 16F series. It is easy to program i assembler, and I think you can get a C compiler for it as well.
I suggest getting started with an Atmega328p or similar ATtiny or ATmega 8-bit microcontroller. Many of these come in a Dual Inline Package (DIP) so you can use them on a solderless breadboard. They also have free tools - GCC (C compiler) or assembly, AVR Studio IDE. I recommend the following for getting started:
Solderless breadboard
Different colors of 22 AWG solid wire (I use red, black, green, and white)
wire cutters/strippers
battery pack, DC power supply, or other power source
microcontroller (ie ATmega328p)
AVR programmer (I use an AVRISP MK-II, you can consider cheaper, non-OEM alternatives such as from pololu.com)
long headers for easy programmer connections (these are pictured in the link below)
Cheap digital multimeter (You can get one on dealextreme.com shipped for around $13)
I highly recommend the following tutorial for getting started from scratch, which has a C example.
avrfreaks.net has support for assembly and C. Also take a look at the ATmega328 datasheet which has some assembly examples. Note that a typical Arduino circuit uses an ATmega328!