LED blinking with 8051:C Program and Proteus design files

8051 LED blinking Program and Proteus design files
>> Here I am starting new series of proteus simulations with programing with this post.

LED blinking with 8051 microcontroller

>>LED blinking is one of the most basic technique used for peripheral interfacing.
>>All you have to do is on and off your input output pin at regular interval (not so fast that you can’t see it :P)
>>8051 microcontroller is one of the most basic microcontroller taught in engineering.
>>So LED blinking with 8051 microcontroller can be your first microcontroller programming project ever.
>>Take it seriously, Start with Proteus simulator, it is one of the most useful resource for students to simulate microcontroller programming  (You can download Proteus 8 from here)
>>Go through the installation guide.
>> Here you can download LED blinking program example with 8051 microntroller proteus simulation.
>> You can download it from below attachment.
>> You can find proteus design files and simple LED blinking program with 500 ms (millisecond) delay function in C keil program.
>>It is for demo purpose only don’t rely on this start making your own projects and if you found out something cool do share with us.
>> Now you have to just download and run simulation.
>> Download files from here:
>> You can also visit to Download Proteus 8 latest version software.
>>Don’t hasitate to tell us if you need some more assistance

Incoming search terms:

Amazon Auto Links: the template could not be found. Try reselecting the template in the unit option page.

by

Comments

  1. renu says:

    i read this code from one of the sites while searching randomly. its little weird to ask for the explanation of the logic used in the following program since you have not written the code n its not your responsibility to explain things not mentioned on your site, but still here is the code n i request you to go through it n explain it if you can:

    #include /* Include 89s51 header file */

    char const num[ ] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};
    void wait (void)
    { ; /* wait function */
    }
    void main( void )
    {
    unsigned int i;
    unsigned char j;
    P0 = 0; /* initialize ZERO to P0 */
    while(1){
    for( j = 0; j < 8; j++ )
    {
    P0 = num[ j ];

    for ( i = 0; i < 10000; i++ )
    {
    wait(); /* delay for half second */
    }
    }
    }
    }

    thank you, in advance

    • #include /* Include 89s51 header file */

      char const num[ ] = {0×01, 0×02, 0×04, 0×08, 0×10, 0×20, 0×40, 0×80};

      void wait (void)
      { ; /* wait function */
      }

      void main( void )
      {
      unsigned int i;
      unsigned char j;
      P0 = 0; /* initialize ZERO to P0 */
      while(1)
      {
      for( j = 0; j < 8; j++ ) { P0 = num[ j ]; for ( i = 0; i < 10000; i++ ) /* delay for half second */ { wait(); } } } } There is only one mistake in above program. Comment is placed at wrong place. This program will blink 8 LED one by one at half second(according to program & crystal frequency) delay.

      • renu says:

        what would exactly happen when “P0 = num[ j ];” is executed? n what is the purpose of this line? “char const num[ ] = {0×01, 0×02, 0×04, 0×08, 0×10, 0×20, 0×40, 0×80};”

        thank you in advance!

        • renu says:

          oh! i got it… those values in the string gets written on the port one by one and the corresponding led blinks…
          hope its right…
          😀
          sorry for the trouble…

  2. renu says:

    i have one more doubt!
    what is the name of the header file for 89s51?
    how should be the first line?
    n when i included different header files, the third line is giving errors.

    code.c(3): error C100: unprintable character 0xD7 skipped

    can u check it n rectify the error?
    not able to run the code…
    its driving me crazy!!! :-{{

    thank you in advance!!!

  3. Helious says:

    How did you compile these .c files to generate .hex files?
    Please let me know the compiler and the reg51.h file you used.
    Thank you

  4. Helious says:

    How did you compile these .c files to generate .hex files? Please provide the reg51.h file.
    Thank you

  5. muhammda yasir says:

    Right click on target and select “option for target” click output tab and checked “create hex file ”

    thanks

  6. Manpreet Garcha says:

    Can u give delay code for 8051 in assembly language

  7. rahul says:

    how i write a programme in c led should be blink only 10 times

  8. michael kors factory outlet says:

    I am starting to work with renesas so i am searching for demo projects.
    can you provide me led blinking code for renesas microroctroller?

  9. Ahmed Ali says:

    hi, genius devil. how can i interface the 8051 with 8 led’s and drive them in a sequence in a row?

Leave a Reply to Manpreet Garcha Cancel reply

*