Thursday, April 3, 2008

Input Output (LED 1)

L E D (Making a LED Blink)

The first step is to build a simple circuit. At this point you should be familiar with the parts used. (1 resistors, and 1 LED). This design is intended for use with an Atmel 89s51 but also posible for others family 8051. Most microcontrollers can handle the current required to turn an LED on and off but. In this lesson we're going to make a LED Blink continously.

Step 1st
Build the circuit as shown in figure 1. As you seen on figure 1 P0.0 is connected to LED's katode. Remember, that all we want to do with this lesson is make a LED blink.




Figure 1 Diagram Skematik LED Blink


Step 2nd
In this step, you must tipe the assembly program to make the LED blink, we assume that you have already known the editor, we used MIDE-51 to edit the program.





Step 3rd
Safe your assembly program above, and name it with LED1.asm (for example) Compile the program that you have been save by using MIDE-51, see the software instruction.


Step 4th
Download your hex file ( LED1.hex ) into the microcontroller by using Microcontroller ATMEL ISP software, see the instruction.After download this hex file you'll see the action of the LED ( of course if your cable connection and your program are corrected ).

No comments: