1. L E D
1.1 Turn On LED
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.
Build the circuit as shown in figure 2.1. As you seen on figure 2.1.
P0.0..P0.7 is connected to LED's katode. Remember, that all we want
to do with this lesson is make eight LED on.
Figure 21. Diagram Skematik LED Blink
In this step, you must tipe the C program to turn on LED, we assume
that you have already known the editor, we used KEIL C Microvision to
edit the program.
Safe your C program above, and name it with LED1.c (for example) Compile
the program that you have been save by using KEIL C, see the software
Download your hex file ( LED1.hex ) into the microcontroller
by using Microcontroller PROG ISP 16.8 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 ).
1.2. Bit Instruction to write
1.3. Blink LED with delay time
unsigned int x;