Dear All
Plz check this attachment
I need a simple program for this circuit.
when S1 pressed ; LED1 & LED3 ON (HOLD IT)
when S1 pressed again ; LED1 & LED3 OFF and LED2 & LED 4 ON
Repeat this function
hemnath suggested simple c logic we don't have any pin and hardware details which pin is S1,where LED1,LED2,LED3,LED4 connected
so its not possible to build code for you.You can do it by just in some minutes rather waiting for others. you can use keil compilers.
According to your hardware connection you are connect switch in p3.2 and led1-p1.0, led2-p1.1, led3-p1.2, led4-p1.4. So, that's way here is your hex file and according to that connection this is the hex file, now you can check it.
Hi sir
The circuit is working but, if press the button LED only BLINK not holding
I have attached the c file which is you given'
My requirement is;
At the Normal stage both LED s are OFF
when we push the input signal LED1& LED3 are ON (in continue ON when its get the next signal)
when we push again the input signal LED2& LED4 are ON LED 1&3 are goes OFF
This cycle repeat
Can you help once again
Regards
Ajitkumar
Try the attached .hex file. You have to pull up P3.0 to +5V using a 10k resistor. Code Compiled for 11.0592 MHz. mikroC PRO 8051 Compiler is used. You can download demo version of mikroC PRO 8051 Compiler from mikroElektronika.
Button has to be pressed and released. Only then the press is registered.
sir
Its working ok
Only the problem when power on the circuit, All LED s are need to OFF
Only work with Input signal.
what to do plese tell me
Regards
Ajitkumar
If you are having same hardware connection as in the post #1 then you will need to reverse your led and change their common Pins(K) to connect gnd if you want to use post #14 hex file.