6 function 8 channel light chaser using 8051.

A 6 function 8 channel light chaser using 8051 is shown here. The hardware and software of this circuit are very simple and the light functions gets repeated one after another  automatically. P1.0 to P1.7  of the microcontroller (AT89S51) are assigned as the output pins. Corresponding LEDs are connected to the output pins through 1K current limiting resistors (R1 to R8). The sequence by which the output pins (P1.0 to P1.7) goes high and low is determined by the program and the LEDs follow this sequence. Circuit diagram of the 6 function chaser using 8051 is shown below.

light chaser AT89S51
6 function light chaser using 8051

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Program.

START: MOV A,#80H
       MOV R7,#07H
       MOV P1,A
       LCALL DELAY
LABEL1: RR A
        MOV P1,A
        LCALL DELAY
        DJNZ R7,LABEL1
        MOV R7,#07H
LABEL2: RL A
        MOV P1,A
        LCALL DELAY
        DJNZ R7,LABEL2
        MOV P1,#81H
        LCALL DELAY
        MOV P1,#42H
        LCALL DELAY
        MOV P1,#24H
        LCALL DELAY
        MOV P1,#18H
        LCALL DELAY
        MOV P1,#0FFH
        LCALL DELAY
        MOV P1,#00H
        LCALL DELAY
        MOV A,#80H
        MOV P1,A
        LCALL DELAY
        MOV R7,#07H
LABEL3: SETB C
        RRC A
        MOV P1,A
        LCALL DELAY
        DJNZ R7,LABEL3
        MOv P1,#00H
        LCALL DELAY
        MOV A,#0AAH
        MOV P1,A
        LCALL DELAY
        CPL A
        MOV P1,A
        LCALL DELAY 
        LJMP START 

DELAY:  MOV R4,#03H
WAIT1: MOV R3,#00H
WAIT2: MOV R2,#00H
WAIT3: DJNZ R2,WAIT3
        DJNZ R3,WAIT2
        DJNZ R4,WAIT1
        RET
        END
Author

10 Comments

    • hello can anyone tell the applicatoins of light chaser???

  1. hello can i get the flow chart of the program??? anynone can help me?

  2. admin

    @Sameer Gupta
    You can convert the assembly language code to hex code using MIDE-51. Its a good software.

  3. what do i must change this circuit if i want to use the 220 volt lamps.

  4. S.Banerjee

    Same set-up If you have any other desidn ,Please publish

  5. Please provide code in “embedded C” it will be more useful and helpful for further developments. Also give the working explanation if possible…

    regards

    dennis

  6. Rowan walters

    Loved this circuit I did electrical and electronic craft
    As an apprentice and we stopped just at micro processors
    I learned all the internals of mpu but never went any
    Further I’m seriously thinking of building something mpu

  7. Sameer Gupta

    Fantastic project for begginers.
    Please write about assembler used & attach the HEX code if it is possible.

  8. Niranjan Hegde

    Please provide code in “embedded C” it will be more useful and helpful for further developments. Also give the working explanation if possible…

    regards
    Niranjan Hegde