Electronic projects will not complete without microcontroller. It is the most easier and low cost project you could ever build. You only need to program and it will run accordingly. However if you want to start microcontroller projects you need only three step to setup a project as describe below.
1. Need microcontroller
Microcontroller is small device consists of CPU, memory (RAM and ROM), I/O port, serial and parallel port, timers, and some type of microcontroller have built in Analog to Digital (A/D) and Digital to Analog (D/A). The cost of single microcontroller relatively is cheap compare to microprocessor.
For the mean time I only focus microcontroller of PIC. After this I will write the tutorial only for PIC16F84A and PIC16F877A. This PIC is the easiest to setup and to program for the beginner.
If you search through internet you will get more type of microcontroller. After all is up to you to decide the best. I suggest for the beginner you can start with PIC to gain an experience.
2. Compiler
Before I go too far it is better I introduce the compiler. The compiler will able a user to program in high-level language. It is using English style language and easier than assembly language.
As student or beginner user, I prefer to use open source compiler. There are varieties of open source compiler available in internet. The popular open source compiler is Small Device C compiler (SDCC) or Great Cow Basic (GCBASIC). SDCC is using C language and GCBASIC using Basic language.
The compiler also will execute your program and produce hex file. The hex file is binary code. It will upload to your microcontroller using programmer. It also produce assembly file. The file could use to simulate your code using simulation program.
3. Programmer
Programmer consists of software and hardware to upload hex file into microcontroller. The software is a program to communicate with programmer hardware via serial or parallel communication. It will take hex file produce by compiler to upload into microcontroller.
The programmer hardware however is to burn binary code from hex file into ROM of microcontroller. After it successfully burned the microcontroller is ready to use.
Software and hardware programmer have varieties type in market. You can buy or build it yourself. There are many circuits available in internet to setup hardware yourself and download software freely. The most popular software and hardware of programmer is at http://www.winpicprog.co.uk/
Finally I hope that you now have an idea how to setup microcontroller project. I also will try to put some tutorial to program microcontroller. The compiler that I used is GCBASIC compiler.
No comments:
Post a Comment