Whats the easiest way to get 3 leds to run in order?
I've been trying for about 3 weeks make a led blink in proteous with pics, so is there any other way to do it, or could somebody PLEASE send me the proteous source file or somthing.
I would use a modulus 3 counter and a 555 timer. The counter will continuously count 0-1-2-0-1-2-0. Thus, running in order. The 555 timer can be set at whatever oscillation rate you want to give the desired effect.
Instead of playing with 555s and counters try to get hands on PICAXE-08 microcontroller (8-pin PIC microcontroller with BASIC interpreter), connect 3 LEDs to its outputs and using your PC computer program it with something like this:
Code:
loop:
high 0 ‘ switch on output 0
pause 1000 ‘ wait 1 second
low 0 ‘ switch off output 0
high 1 ‘ switch on output 1
pause 1000 ‘ wait 1 second
low 1 ‘ switch off output 1
high 4 ‘ switch on output 4
pause 1000 ‘ wait 1 second
low 4 ‘ switch off output 4
goto loop ‘ loop back to start
end
If you want the LEDs to 'run' faster, change 'pause 1000' to anythink you like, for example, 'pause 100' = 0.1s delay ..
I think IanP has posted exactly what i want to do, with the pic chip, the problem for me comes in actually wiring the circuit up?
Could you please explain how you actually wire this circuit up...
Also, my programmer doesnt do the chip you mention, only PIC16F84A (which cost a lot), and 12c508 -- which i dont know if it can do much?
I can change your code in picbasic pro to hex, but then how would i actually wire the circuit up to make the leds come on. I have loaded your code into a 16f84a, and i can see it working in proteus -- i can see the little legs change colour (i've marked them in green), but nothing i can do will make the LED light up, i have tried every way of wiring the chip to the battery, to the led, and it doesnt work. If i just do a stright battery to LED, it lights up, but i do not know how to give the chip power.
First of all, to program PICAXE microcontrollers you don't need any special programmer .. just two resistors (10kΩ and 22kΩ) and access to the PC's serial port ..
Connecting LEDs to PIC microcontrollers' outputs is quite simple - in most cases outputs can source/sink sufficient current to drive typical LEDs ..
The only one thing to remember is a resistor that limits the LED's current .. see picture below ..
Whats the easiest way to get 3 leds to run in order?
I've been trying for about 3 weeks make a led blink in proteous with pics, so is there any other way to do it, or could somebody PLEASE send me the proteous source file or somthing.