??? 07/25/04 06:57 Read: times |
#74826 - RE: What's wrong NOW Responding to: ???'s previous message |
ANother code without a single comment. Maybe its simple and you thought why comment it. But I doubt if it will work anyway :
Instead of "mov p1, #0ffh", better is "setb P1.0" Maybe now its only one port pin in use. But later if other pins are also used this will spell trouble. No debounce for S1 ? Maybe your code will catch the first contact and trigger the relay, but please remember : without debounce, your relay will SURE be triggered even when S1 opens. I am sure you dont want this ? And I immediatley advise ( order ?! ) you to name variables more imaginatively : Just swap the "Var" with Dly_Count. You get Dly_Count1, Dly_Count2. In a small code like this it does not bother but if have to search a 4000 line code and come across Var1 - well it means little . At least to me. Raghu |