Monday, June 13, 2011

Blinking Led Lamp with sdcc program

The first we must install sdcc program, after that we can begin to make Blinking Led Lamp.

1. type programs in the following figures on the notepad program

2. Save the file with the extension c (*. c).


3. run command prompt program.
4. Check that SDCC is installed on your computer with sdcc-v command, if SDCC is installed it will show a version of the SDCC is installed on the computer. If the SDCC have not installed it will display an error message and you have to install first SDCC


5. Compile led1.c with led1.c sdcc command if no error message means that your program is correct

6. Type the dir command to view existing files in the directory, it will be seen several files that appear after the compilation include:

     led1.asm, an assembly file that is produced from led1.c
     led1.lst, a file listing program
     led1.ihx, a hex file which is formed from the compilation and will be programmed into the microcontroller. previous extension *. ihx must change the *. hex using the command: packihx led1.ihx> led1.hex


7. Led1.hex file ready for programming into the microcontroller
8. Connect the microcontroller in the programmer, run the programmer software on your PC and then browse to c: \ tutorial for hex files to be programmed, select led1.hex

9. Once programming is complete pairs of microcontroller in the system that has been made
10. The system is ready for the try, observe the LED light
11. Done, you can try to make other programs




No comments:

Post a Comment