Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

leds light up circuit needed?

Status
Not open for further replies.

cestudent

New Member
hello guys
how r u all?

am a new member here . i have a problem which i want to light up for example : 4 leds one by one " led1 on then led2 on ...." like this . i dont know how to do that . can anyone plz help with the circuit design coz i need it for my project
coz am doing lift project and i want these leds light up with the movement of the lift ?
 
Last edited:
If you just want a strip of 4 lights to light in sequence then have a look at the CMOS 4017. Connect outputs 1-4 to the LEDs and then link output 5 to the reset. Use a 555 timer or a crystal oscillator for the clock input
 
A CD4017 can show LEDs sequencing one way directly and sequencing the other way through diodes.
 
One CD4017 with diodes can light 6 LEDs back and forth.
More CD4017 ICs can be cascaded and with many more diodes to drive many more LEDs.
 
thank u " ormo , Ubergeek63 & audioguru" for ur help :)

but i have a question , can i control this chip with Pic with up/down sequence??:confused:
 
Last edited:
This is a Cylon / Knight Rider LED sequence written for my Junebug kit.
It flashes 6 charlieplexed LEDs using a PIC18F1320
Code:
; DIP Switch (SW6) must have TUTOR on (SW6-1,2,3) all other switches off
list p=18F1320
include <p18F1320.inc>
CONFIG OSC = INTIO2, WDT = OFF, LVP = OFF
LED macro x,y ; MACRO LED <PORTA>, <TRISA>
    movlw x
    movwf LATA ; LATA = x
    movlw y
    movwf TRISA ; TRISA = y
    call Delay ; call the Delay subroutine
    endm ; end macro
Count equ 0 ; delay loop counter
    org 0 ; reset vector
    bsf ADCON1, 0 ; make RA0 digital
LED1  LED b'00000001', b'10111110' ; LED <PORTA>, <TRISA>
LED2r LED b'01000000', b'10111110' ; LED <PORTA>, <TRISA>
LED3r LED b'01000000', b'00111111' ; LED <PORTA>, <TRISA>
LED4r LED b'10000000', b'00111111' ; LED <PORTA>, <TRISA>
LED5r LED b'10000000', b'01111110' ; LED <PORTA>, <TRISA>
LED6  LED b'00000001', b'01111110' ; LED <PORTA>, <TRISA>
LED5l LED b'10000000', b'01111110' ; LED <PORTA>, <TRISA>
LED4l LED b'10000000', b'00111111' ; LED <PORTA>, <TRISA>
LED3l LED b'01000000', b'00111111' ; LED <PORTA>, <TRISA>
LED2l LED b'01000000', b'10111110' ; LED <PORTA>, <TRISA>
    bra LED1 ; loop forever
Delay decfsz Count, f ; decrement Count and skip when zero
    bra Delay ; not zero? repeat
    return ; return
END
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top