Thursday, December 25, 2008

The simulator is a program that simulates Microcontroller code execution and other electronic component behavior.

One good simulator I 've tried and I recommend is Labcenter Proteus 7.

You can install it and try the hardware components and software program and debug them for run-time errors and functioning errors. All this before building the real-world application on the board. This approach is very useful and can reduce developing time and frustration and eliminate situations such as you connect the circuit and get no action at all. You then wonder
what 's wrong. And you can get lost debugging hardware and software and don 't know where to
start from.

This introduction is to show the advantages of using the simulator before building your circuit board.

Let 's get started ..........

1- Install the simulator ( Labcenter Proteus 7 ).

2- Run the program ISIS.

3- Draw the components of the flasher application as in this screen-shot.

4- After you copy the code from the previous post into a file named Flasher.ASM, add the source

and choose the code generation tools MPASMWIN and the source file Flasher.ASM

Now you have successfully configured the source file and code generation tools for code

compilation.

5- You can now compile the program by choosing the Source menu ---> Build All .

If every thing goes right, you should get the screen

6- You will notice that a Flaher.HEX file has been generated in the working folder.

7- Now double-click on the PIC16F84A component in your design , you get the window,

Choose the Flasher.HEX and set the Processor Clock Frequency to 4MHz.

8- Now press the play button to start debugging and running the program.

Now , you see the led flashing . Congratulations !!! The program is running.

We can start to build our first real-wold circuit....

If you like this blog you can support us by many ways: 1. Leave comments stating your point of view about this article. 2. Buy our book on Amazon Learn By Making. 3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.

1 - Copy the above text and paste it in an empty text file and save it as Flasher.asm

2 - Install the MPLab program and search for the file MPASMWIN.EXE in its path.

3- Run the program. It looks like this :

Uncheck the case-sensitive option.

4 - Browse for the Flasher.asm file and press Assemble.

If every thing goes write , you will have the window :

Congratiulations, the assemble process is complete !!
The Flasher.hex file will be generated in the same directory of Flasher.asm

Note : If you like this blog ( or don't ) , please give me feedback by commenting. Thanks ...

If you like this blog you can support us by many ways: 1. Leave comments stating your point of view about this article. 2. Buy our book on Amazon Learn By Making. 3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.

3 - Loader program ( ICProg ) - you 'll need it if you use JDM programmer - , but if you buy a ready-made programmer , you will have the software with it.

4 - MPLab program ( to assemble ) the programs you write in Assembley .

5 - HiTec PICC ( to compile programs in C ) .

6 - Proteus 7.0 Simulator

You can get all these stuff for FREE from the Internet.

If you like this blog you can support us by many ways: 1. Leave comments stating your point of view about this article. 2. Buy our book on Amazon Learn By Making. 3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.

It is a smart IC that can be programmed to do some task. Unlike a typical IC which does a certain function that cannot be changed, the Microcontroller function is defined by its software code written on it. you can change the code when you want and thus change its function. Smart means it can decide and take actions according to its code.

So what 's the difference between Microcontroller(uC) and Microprocessor(uP) ??

uP needs some other devices to be able to work ( BIOS, RAM, I/O Ports , ... ) all these devices are other IC 's.

Although the uP is more general purpose than than the uC , but the fact that the uC contains all the required devices in one package ( EEPROM, RAM, IO Ports , ADC , UART , etc ... ) overcomes the limited abilities and small instruction set of the uC.

If you like this blog you can support us by many ways: 1. Leave comments stating your point of view about this article. 2. Buy our book on Amazon Learn By Making. 3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.

Saturday, December 6, 2008

I started with the old computer AQUARIUS at the 80 's. It hadMicrosoft Basic on it. I learned programming in Basic. I then got my Pentium 1 at 90's.

I learned Microsoft DOS and Windows. Then I learned C language.I got AMD PC at year 2000 and I learned more about PC hardware.I also knew about Microcontrollers ( Microchip PIC , Atmel , Renesas ) .I programmed Microcontrollers in Assembly and C.At 2006 I got Toshiba Satellite Notebook.This year, I joined the Renesas HTS contest. I submitted my project " Multichannel Oscilloscope" and guess what , I had the forth honored mention.

If you like this blog you can support us by many ways: 1. Leave comments stating your point of view about this article. 2. Buy our book on Amazon Learn By Making. 3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.