Thursday, September 9, 2010

AT89S51 programming

      For programming a micro controller three things are necessary. 1) Assembler/ Compiler 2) Debugger/ Simulator 3)Programmer. Once the logic and algorithms are ready we need to write the program either in assembly language or  in C. For assembly language we use assembler for converting it to the machine code and in the case of C we use a compiler. Now we have to test the program for errors and performance using a debugger or simulator. Once everything  is working well you can now use the programmer to write the programm on to the micro controllers flash memory.

     AT89S51 is 8051 compatible, so we can use 8051's assembler called ASEM-51. This assembler runs in DOS mode. Fisrt of all you need to write the program in a text document and save it as filename.asm. Now run the ASEM assembler. It will ask you to give the path to acces the file. If you have saved the file in any other folder you will need to specify complete path.Once this is given ASEM will generate the corresponding HEX file with extension .hex. If erros are found you can again edit the ASM file and repeat the process. Once all errors are cleared you can now debug your program using JSIM.

     If you are satisfied with your program next we have to write this into the flash memory of AT89S51. For this we use ISP Flash programmer version 3.0. Link to access the complete programmer circuit and the software are given at the end.

Download Links:
ISP Flash programmer version 3.0


Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes