??? 07/24/04 14:36 Read: times |
#74798 - What's wrong NOW Responding to: ???'s previous message |
I will be switching 24V/5W Solenoids,
The client has provided a separate 24V SMPS for supply to solenoids I hope 7805 will work in this satisfactorily I was trying to switch the relay from the uC today but it didn't work. I tried connecting only ULN2003AN to the relay bed it work perfectly when I give VCC to 1B the relay connected 1c or pin 16 switches on I have put a diode across the relay bed too ( not shown in ckt ) I checked using logic probe the following is the way I traced it *** *After reset all pins are high the relay does not switch on like before after reset *when the button on pin 1.0 is pressed i.e. p1.0 grounded *O/P of p3.1 goes low *I/P of 74HC04 is low *O/P through pin2 is high which is connected 1B of ULN I am supplying ULN from a different 5V regulated supply. ![]() ************ My program * ************ What it does is basically check if the p1.0 has gone low if so it switches on p3.1 for 1 sec and turns it off pin 3.1 is connected to 74HC04 and pin 2 of 74HC04 is connected to ULN2003AN (1b) as shown in diagram $Mod51 Org 0000h Sjmp main Var1 equ r0 Var2 equ r1 Var3 equ r2 Dispbool equ 20h ;************************************************* Delay: mov var3,#8 mov var2,#8 mov var1,#236 Tt1: djnz var1,tt1 djnz var2,tt1 djnz var3,tt1 ret Main: mov p1,#0ffh Check1: jnb p1.0,selrel sjmp check1 Selrel: clr p3.1 call delay setb p3.1 sjmp check1 End Thank you Deepak |